Skip to content

Commit facd026

Browse files
authored
Merge pull request #90 from RogueMaster/unleashed
update stuff
2 parents f73dc83 + a3a64d6 commit facd026

File tree

4 files changed

+13
-74
lines changed

4 files changed

+13
-74
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ $ docker-compose exec dev ./fbt
2121
- OFW: [Fix a race condition #1376 (By Astrrra)](https://github.com/flipperdevices/flipperzero-firmware/pull/1376)
2222
- OFW: [CLI, threads, notifications, archive fixes #1354 (By nminaylov)](https://github.com/flipperdevices/flipperzero-firmware/pull/1354)
2323
- Added [UPC Generator (By McAzzaMan)](https://github.com/McAzzaMan/flipperzero-firmware/tree/UPC-A_Barcode_Generator/applications/barcode_generator)
24+
- Updates for [Bluetooth Remote Additions #1330 (By Cutch)](https://github.com/flipperdevices/flipperzero-firmware/pull/1330)
2425

2526
## **Special Instructions:**
2627
- Download these files into the subghz/assets folder on your SD card. Edit the two `_map` files to contain your specific subghz (.SUB) files.

applications/bt/bt_hid_app/views/bt_hid_keyboard.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ BtHidKeyboardKey keyboardKeySet[ROW_COUNT][COLUMN_COUNT] = {
7979
.value = HID_KEYBOARD_CLOSE_BRACKET},
8080
},
8181
{
82-
{.width = 1, .icon = NULL, .key = "a", .shift_key = "A", .value = HID_KEYBOARD_Q},
83-
{.width = 1, .icon = NULL, .key = "s", .shift_key = "S", .value = HID_KEYBOARD_W},
84-
{.width = 1, .icon = NULL, .key = "d", .shift_key = "D", .value = HID_KEYBOARD_E},
85-
{.width = 1, .icon = NULL, .key = "f", .shift_key = "F", .value = HID_KEYBOARD_R},
86-
{.width = 1, .icon = NULL, .key = "g", .shift_key = "G", .value = HID_KEYBOARD_T},
87-
{.width = 1, .icon = NULL, .key = "h", .shift_key = "H", .value = HID_KEYBOARD_Y},
88-
{.width = 1, .icon = NULL, .key = "j", .shift_key = "J", .value = HID_KEYBOARD_U},
89-
{.width = 1, .icon = NULL, .key = "k", .shift_key = "K", .value = HID_KEYBOARD_I},
90-
{.width = 1, .icon = NULL, .key = "l", .shift_key = "L", .value = HID_KEYBOARD_O},
82+
{.width = 1, .icon = NULL, .key = "a", .shift_key = "A", .value = HID_KEYBOARD_A},
83+
{.width = 1, .icon = NULL, .key = "s", .shift_key = "S", .value = HID_KEYBOARD_S},
84+
{.width = 1, .icon = NULL, .key = "d", .shift_key = "D", .value = HID_KEYBOARD_D},
85+
{.width = 1, .icon = NULL, .key = "f", .shift_key = "F", .value = HID_KEYBOARD_F},
86+
{.width = 1, .icon = NULL, .key = "g", .shift_key = "G", .value = HID_KEYBOARD_G},
87+
{.width = 1, .icon = NULL, .key = "h", .shift_key = "H", .value = HID_KEYBOARD_H},
88+
{.width = 1, .icon = NULL, .key = "j", .shift_key = "J", .value = HID_KEYBOARD_J},
89+
{.width = 1, .icon = NULL, .key = "k", .shift_key = "K", .value = HID_KEYBOARD_K},
90+
{.width = 1, .icon = NULL, .key = "l", .shift_key = "L", .value = HID_KEYBOARD_L},
9191
{.width = 1, .icon = NULL, .key = ";", .shift_key = ":", .value = HID_KEYBOARD_SEMICOLON},
9292
{.width = 2, .icon = &I_Pin_arrow_right_9x7, .value = HID_KEYBOARD_RETURN},
9393
{.width = 0, .value = HID_KEYBOARD_RETURN},
@@ -376,4 +376,4 @@ void bt_hid_keyboard_set_connected_status(BtHidKeyboard* bt_hid_keyboard, bool c
376376
model->connected = connected;
377377
return true;
378378
});
379-
}
379+
}

applications/bt/bt_hid_app/views/bt_hid_keynote.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void bt_hid_keynote_draw_callback(Canvas* canvas, void* context) {
7575
// Right
7676
canvas_draw_icon(canvas, 42, 45, &I_Button_18x18);
7777
if(model->right_pressed) {
78-
elements_slightly_rounded_box(canvas, 65, 47, 13, 13);
78+
elements_slightly_rounded_box(canvas, 45, 47, 13, 13);
7979
canvas_set_color(canvas, ColorWhite);
8080
}
8181
bt_hid_keynote_draw_arrow(canvas, 53, 53, CanvasDirectionLeftToRight);
@@ -198,4 +198,4 @@ void bt_hid_keynote_set_connected_status(BtHidKeynote* bt_hid_keynote, bool conn
198198
model->connected = connected;
199199
return true;
200200
});
201-
}
201+
}

firmware/targets/f7/ble_glue/hid_service.c

-62
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ typedef struct {
1010
uint16_t svc_handle;
1111
uint16_t protocol_mode_char_handle;
1212
uint16_t report_char_handle[HID_SVC_REPORT_COUNT];
13-
uint16_t report_ref_desc_handle[HID_SVC_REPORT_COUNT];
1413
uint16_t report_map_char_handle;
1514
uint16_t info_char_handle;
1615
uint16_t ctrl_point_char_handle;
@@ -39,7 +38,6 @@ void hid_svc_start() {
3938
tBleStatus status;
4039
hid_svc = malloc(sizeof(HIDSvc));
4140
Service_UUID_t svc_uuid = {};
42-
Char_Desc_Uuid_t desc_uuid = {};
4341
Char_UUID_t char_uuid = {};
4442

4543
// Register event handler
@@ -88,7 +86,6 @@ void hid_svc_start() {
8886
#if(HID_SVC_REPORT_COUNT != 0)
8987
for(uint8_t i = 0; i < HID_SVC_REPORT_COUNT; i++) {
9088
if(i < HID_SVC_INPUT_REPORT_COUNT) {
91-
uint8_t buf[2] = {i, 1}; // 1 input
9289
char_uuid.Char_UUID_16 = REPORT_CHAR_UUID;
9390
status = aci_gatt_add_char(
9491
hid_svc->svc_handle,
@@ -104,27 +101,7 @@ void hid_svc_start() {
104101
if(status) {
105102
FURI_LOG_E(TAG, "Failed to add report characteristic: %d", status);
106103
}
107-
108-
desc_uuid.Char_UUID_16 = REPORT_REFERENCE_DESCRIPTOR_UUID;
109-
status = aci_gatt_add_char_desc(
110-
hid_svc->svc_handle,
111-
hid_svc->report_char_handle[i],
112-
UUID_TYPE_16,
113-
&desc_uuid,
114-
HID_SVC_REPORT_REF_LEN,
115-
HID_SVC_REPORT_REF_LEN,
116-
buf,
117-
ATTR_PERMISSION_NONE,
118-
ATTR_ACCESS_READ_ONLY,
119-
GATT_DONT_NOTIFY_EVENTS,
120-
MIN_ENCRY_KEY_SIZE,
121-
CHAR_VALUE_LEN_CONSTANT,
122-
&(hid_svc->report_ref_desc_handle[i]));
123-
if(status) {
124-
FURI_LOG_E(TAG, "Failed to add report reference descriptor: %d", status);
125-
}
126104
} else if((i - HID_SVC_INPUT_REPORT_COUNT) < HID_SVC_OUTPUT_REPORT_COUNT) {
127-
uint8_t buf[2] = {i, 2}; // 2 output
128105
char_uuid.Char_UUID_16 = REPORT_CHAR_UUID;
129106
status = aci_gatt_add_char(
130107
hid_svc->svc_handle,
@@ -140,27 +117,7 @@ void hid_svc_start() {
140117
if(status) {
141118
FURI_LOG_E(TAG, "Failed to add report characteristic: %d", status);
142119
}
143-
144-
desc_uuid.Char_UUID_16 = REPORT_REFERENCE_DESCRIPTOR_UUID;
145-
status = aci_gatt_add_char_desc(
146-
hid_svc->svc_handle,
147-
hid_svc->report_char_handle[i],
148-
UUID_TYPE_16,
149-
&desc_uuid,
150-
HID_SVC_REPORT_REF_LEN,
151-
HID_SVC_REPORT_REF_LEN,
152-
buf,
153-
ATTR_PERMISSION_NONE,
154-
ATTR_ACCESS_READ_ONLY,
155-
GATT_DONT_NOTIFY_EVENTS,
156-
MIN_ENCRY_KEY_SIZE,
157-
CHAR_VALUE_LEN_CONSTANT,
158-
&(hid_svc->report_ref_desc_handle[i]));
159-
if(status) {
160-
FURI_LOG_E(TAG, "Failed to add report reference descriptor: %d", status);
161-
}
162120
} else {
163-
uint8_t buf[2] = {i, 3}; // 3 feature
164121
char_uuid.Char_UUID_16 = REPORT_CHAR_UUID;
165122
status = aci_gatt_add_char(
166123
hid_svc->svc_handle,
@@ -176,25 +133,6 @@ void hid_svc_start() {
176133
if(status) {
177134
FURI_LOG_E(TAG, "Failed to add report characteristic: %d", status);
178135
}
179-
180-
desc_uuid.Char_UUID_16 = REPORT_REFERENCE_DESCRIPTOR_UUID;
181-
status = aci_gatt_add_char_desc(
182-
hid_svc->svc_handle,
183-
hid_svc->report_char_handle[i],
184-
UUID_TYPE_16,
185-
&desc_uuid,
186-
HID_SVC_REPORT_REF_LEN,
187-
HID_SVC_REPORT_REF_LEN,
188-
buf,
189-
ATTR_PERMISSION_NONE,
190-
ATTR_ACCESS_READ_ONLY,
191-
GATT_DONT_NOTIFY_EVENTS,
192-
MIN_ENCRY_KEY_SIZE,
193-
CHAR_VALUE_LEN_CONSTANT,
194-
&(hid_svc->report_ref_desc_handle[i]));
195-
if(status) {
196-
FURI_LOG_E(TAG, "Failed to add report reference descriptor: %d", status);
197-
}
198136
}
199137
}
200138
#endif

0 commit comments

Comments
 (0)