Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update stuff #90

Merged
merged 4 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ $ docker-compose exec dev ./fbt
- OFW: [Fix a race condition #1376 (By Astrrra)](https://github.com/flipperdevices/flipperzero-firmware/pull/1376)
- OFW: [CLI, threads, notifications, archive fixes #1354 (By nminaylov)](https://github.com/flipperdevices/flipperzero-firmware/pull/1354)
- Added [UPC Generator (By McAzzaMan)](https://github.com/McAzzaMan/flipperzero-firmware/tree/UPC-A_Barcode_Generator/applications/barcode_generator)
- Updates for [Bluetooth Remote Additions #1330 (By Cutch)](https://github.com/flipperdevices/flipperzero-firmware/pull/1330)

## **Special Instructions:**
- Download these files into the subghz/assets folder on your SD card. Edit the two `_map` files to contain your specific subghz (.SUB) files.
Expand Down
20 changes: 10 additions & 10 deletions applications/bt/bt_hid_app/views/bt_hid_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ BtHidKeyboardKey keyboardKeySet[ROW_COUNT][COLUMN_COUNT] = {
.value = HID_KEYBOARD_CLOSE_BRACKET},
},
{
{.width = 1, .icon = NULL, .key = "a", .shift_key = "A", .value = HID_KEYBOARD_Q},
{.width = 1, .icon = NULL, .key = "s", .shift_key = "S", .value = HID_KEYBOARD_W},
{.width = 1, .icon = NULL, .key = "d", .shift_key = "D", .value = HID_KEYBOARD_E},
{.width = 1, .icon = NULL, .key = "f", .shift_key = "F", .value = HID_KEYBOARD_R},
{.width = 1, .icon = NULL, .key = "g", .shift_key = "G", .value = HID_KEYBOARD_T},
{.width = 1, .icon = NULL, .key = "h", .shift_key = "H", .value = HID_KEYBOARD_Y},
{.width = 1, .icon = NULL, .key = "j", .shift_key = "J", .value = HID_KEYBOARD_U},
{.width = 1, .icon = NULL, .key = "k", .shift_key = "K", .value = HID_KEYBOARD_I},
{.width = 1, .icon = NULL, .key = "l", .shift_key = "L", .value = HID_KEYBOARD_O},
{.width = 1, .icon = NULL, .key = "a", .shift_key = "A", .value = HID_KEYBOARD_A},
{.width = 1, .icon = NULL, .key = "s", .shift_key = "S", .value = HID_KEYBOARD_S},
{.width = 1, .icon = NULL, .key = "d", .shift_key = "D", .value = HID_KEYBOARD_D},
{.width = 1, .icon = NULL, .key = "f", .shift_key = "F", .value = HID_KEYBOARD_F},
{.width = 1, .icon = NULL, .key = "g", .shift_key = "G", .value = HID_KEYBOARD_G},
{.width = 1, .icon = NULL, .key = "h", .shift_key = "H", .value = HID_KEYBOARD_H},
{.width = 1, .icon = NULL, .key = "j", .shift_key = "J", .value = HID_KEYBOARD_J},
{.width = 1, .icon = NULL, .key = "k", .shift_key = "K", .value = HID_KEYBOARD_K},
{.width = 1, .icon = NULL, .key = "l", .shift_key = "L", .value = HID_KEYBOARD_L},
{.width = 1, .icon = NULL, .key = ";", .shift_key = ":", .value = HID_KEYBOARD_SEMICOLON},
{.width = 2, .icon = &I_Pin_arrow_right_9x7, .value = HID_KEYBOARD_RETURN},
{.width = 0, .value = HID_KEYBOARD_RETURN},
Expand Down Expand Up @@ -376,4 +376,4 @@ void bt_hid_keyboard_set_connected_status(BtHidKeyboard* bt_hid_keyboard, bool c
model->connected = connected;
return true;
});
}
}
4 changes: 2 additions & 2 deletions applications/bt/bt_hid_app/views/bt_hid_keynote.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static void bt_hid_keynote_draw_callback(Canvas* canvas, void* context) {
// Right
canvas_draw_icon(canvas, 42, 45, &I_Button_18x18);
if(model->right_pressed) {
elements_slightly_rounded_box(canvas, 65, 47, 13, 13);
elements_slightly_rounded_box(canvas, 45, 47, 13, 13);
canvas_set_color(canvas, ColorWhite);
}
bt_hid_keynote_draw_arrow(canvas, 53, 53, CanvasDirectionLeftToRight);
Expand Down Expand Up @@ -198,4 +198,4 @@ void bt_hid_keynote_set_connected_status(BtHidKeynote* bt_hid_keynote, bool conn
model->connected = connected;
return true;
});
}
}
62 changes: 0 additions & 62 deletions firmware/targets/f7/ble_glue/hid_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ typedef struct {
uint16_t svc_handle;
uint16_t protocol_mode_char_handle;
uint16_t report_char_handle[HID_SVC_REPORT_COUNT];
uint16_t report_ref_desc_handle[HID_SVC_REPORT_COUNT];
uint16_t report_map_char_handle;
uint16_t info_char_handle;
uint16_t ctrl_point_char_handle;
Expand Down Expand Up @@ -39,7 +38,6 @@ void hid_svc_start() {
tBleStatus status;
hid_svc = malloc(sizeof(HIDSvc));
Service_UUID_t svc_uuid = {};
Char_Desc_Uuid_t desc_uuid = {};
Char_UUID_t char_uuid = {};

// Register event handler
Expand Down Expand Up @@ -88,7 +86,6 @@ void hid_svc_start() {
#if(HID_SVC_REPORT_COUNT != 0)
for(uint8_t i = 0; i < HID_SVC_REPORT_COUNT; i++) {
if(i < HID_SVC_INPUT_REPORT_COUNT) {
uint8_t buf[2] = {i, 1}; // 1 input
char_uuid.Char_UUID_16 = REPORT_CHAR_UUID;
status = aci_gatt_add_char(
hid_svc->svc_handle,
Expand All @@ -104,27 +101,7 @@ void hid_svc_start() {
if(status) {
FURI_LOG_E(TAG, "Failed to add report characteristic: %d", status);
}

desc_uuid.Char_UUID_16 = REPORT_REFERENCE_DESCRIPTOR_UUID;
status = aci_gatt_add_char_desc(
hid_svc->svc_handle,
hid_svc->report_char_handle[i],
UUID_TYPE_16,
&desc_uuid,
HID_SVC_REPORT_REF_LEN,
HID_SVC_REPORT_REF_LEN,
buf,
ATTR_PERMISSION_NONE,
ATTR_ACCESS_READ_ONLY,
GATT_DONT_NOTIFY_EVENTS,
MIN_ENCRY_KEY_SIZE,
CHAR_VALUE_LEN_CONSTANT,
&(hid_svc->report_ref_desc_handle[i]));
if(status) {
FURI_LOG_E(TAG, "Failed to add report reference descriptor: %d", status);
}
} else if((i - HID_SVC_INPUT_REPORT_COUNT) < HID_SVC_OUTPUT_REPORT_COUNT) {
uint8_t buf[2] = {i, 2}; // 2 output
char_uuid.Char_UUID_16 = REPORT_CHAR_UUID;
status = aci_gatt_add_char(
hid_svc->svc_handle,
Expand All @@ -140,27 +117,7 @@ void hid_svc_start() {
if(status) {
FURI_LOG_E(TAG, "Failed to add report characteristic: %d", status);
}

desc_uuid.Char_UUID_16 = REPORT_REFERENCE_DESCRIPTOR_UUID;
status = aci_gatt_add_char_desc(
hid_svc->svc_handle,
hid_svc->report_char_handle[i],
UUID_TYPE_16,
&desc_uuid,
HID_SVC_REPORT_REF_LEN,
HID_SVC_REPORT_REF_LEN,
buf,
ATTR_PERMISSION_NONE,
ATTR_ACCESS_READ_ONLY,
GATT_DONT_NOTIFY_EVENTS,
MIN_ENCRY_KEY_SIZE,
CHAR_VALUE_LEN_CONSTANT,
&(hid_svc->report_ref_desc_handle[i]));
if(status) {
FURI_LOG_E(TAG, "Failed to add report reference descriptor: %d", status);
}
} else {
uint8_t buf[2] = {i, 3}; // 3 feature
char_uuid.Char_UUID_16 = REPORT_CHAR_UUID;
status = aci_gatt_add_char(
hid_svc->svc_handle,
Expand All @@ -176,25 +133,6 @@ void hid_svc_start() {
if(status) {
FURI_LOG_E(TAG, "Failed to add report characteristic: %d", status);
}

desc_uuid.Char_UUID_16 = REPORT_REFERENCE_DESCRIPTOR_UUID;
status = aci_gatt_add_char_desc(
hid_svc->svc_handle,
hid_svc->report_char_handle[i],
UUID_TYPE_16,
&desc_uuid,
HID_SVC_REPORT_REF_LEN,
HID_SVC_REPORT_REF_LEN,
buf,
ATTR_PERMISSION_NONE,
ATTR_ACCESS_READ_ONLY,
GATT_DONT_NOTIFY_EVENTS,
MIN_ENCRY_KEY_SIZE,
CHAR_VALUE_LEN_CONSTANT,
&(hid_svc->report_ref_desc_handle[i]));
if(status) {
FURI_LOG_E(TAG, "Failed to add report reference descriptor: %d", status);
}
}
}
#endif
Expand Down