Skip to content

Commit bed2167

Browse files
author
Yury Vostrenkov
committed
Fixed button operation when shift exists but not pressed
1 parent a2563be commit bed2167

File tree

6 files changed

+45
-16
lines changed

6 files changed

+45
-16
lines changed

MDK-ARM/FreeJoy.bin

-13.4 KB
Binary file not shown.

MDK-ARM/FreeJoy.uvoptx

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,24 @@
153153
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103C8$Flash\STM32F10x_128.FLM))</Name>
154154
</SetRegEntry>
155155
</TargetDriverDllRegistry>
156-
<Breakpoint/>
156+
<Breakpoint>
157+
<Bp>
158+
<Number>0</Number>
159+
<Type>0</Type>
160+
<LineNumber>704</LineNumber>
161+
<EnabledFlag>1</EnabledFlag>
162+
<Address>134236764</Address>
163+
<ByteObject>0</ByteObject>
164+
<HtxType>0</HtxType>
165+
<ManyObjects>0</ManyObjects>
166+
<SizeOfObject>0</SizeOfObject>
167+
<BreakByAccess>0</BreakByAccess>
168+
<BreakIfRCount>1</BreakIfRCount>
169+
<Filename>..\application\Src\buttons.c</Filename>
170+
<ExecCommand></ExecCommand>
171+
<Expression>\\FreeJoy\../application/Src/buttons.c\704</Expression>
172+
</Bp>
173+
</Breakpoint>
157174
<WatchWindow1>
158175
<Ww>
159176
<count>0</count>
@@ -220,6 +237,11 @@
220237
<WinNumber>1</WinNumber>
221238
<ItemText>raw_buttons</ItemText>
222239
</Ww>
240+
<Ww>
241+
<count>13</count>
242+
<WinNumber>1</WinNumber>
243+
<ItemText>shifts_state</ItemText>
244+
</Ww>
223245
</WatchWindow1>
224246
<MemoryWindow1>
225247
<Mm>
@@ -279,16 +301,6 @@
279301
<pszMrulep></pszMrulep>
280302
<pSingCmdsp></pSingCmdsp>
281303
<pMultCmdsp></pMultCmdsp>
282-
<SystemViewers>
283-
<Entry>
284-
<Name>System Viewer\GPIOA</Name>
285-
<WinId>35905</WinId>
286-
</Entry>
287-
<Entry>
288-
<Name>System Viewer\USB</Name>
289-
<WinId>35904</WinId>
290-
</Entry>
291-
</SystemViewers>
292304
<DebugDescription>
293305
<Enable>1</Enable>
294306
<EnableFlashSeq>1</EnableFlashSeq>
@@ -431,7 +443,24 @@
431443
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103C8$Flash\STM32F10x_128.FLM))</Name>
432444
</SetRegEntry>
433445
</TargetDriverDllRegistry>
434-
<Breakpoint/>
446+
<Breakpoint>
447+
<Bp>
448+
<Number>0</Number>
449+
<Type>0</Type>
450+
<LineNumber>704</LineNumber>
451+
<EnabledFlag>1</EnabledFlag>
452+
<Address>0</Address>
453+
<ByteObject>0</ByteObject>
454+
<HtxType>0</HtxType>
455+
<ManyObjects>0</ManyObjects>
456+
<SizeOfObject>0</SizeOfObject>
457+
<BreakByAccess>0</BreakByAccess>
458+
<BreakIfRCount>0</BreakIfRCount>
459+
<Filename>..\application\Src\buttons.c</Filename>
460+
<ExecCommand></ExecCommand>
461+
<Expression></Expression>
462+
</Bp>
463+
</Breakpoint>
435464
<WatchWindow1>
436465
<Ww>
437466
<count>0</count>

MDK-ARM/FreeJoy.uvprojx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
</ArmAdsMisc>
313313
<Cads>
314314
<interw>1</interw>
315-
<Optim>1</Optim>
315+
<Optim>4</Optim>
316316
<oTime>0</oTime>
317317
<SplitLS>0</SplitLS>
318318
<OneElfS>1</OneElfS>

application/Inc/main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
static const dev_config_t init_config =
2020
{
21-
.firmware_version = 0x1605, // do not change
21+
.firmware_version = 0x1606, // do not change
2222

2323
/*
2424
Name of device in devices dispatcher

application/Src/buttons.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ void ButtonsReadLogical (dev_config_t * p_dev_config)
760760
(p_dev_config->buttons[j].shift_modificator) == 0)
761761
{
762762
logical_buttons_state[j].prev_physical_state = logical_buttons_state[j].curr_physical_state;
763-
logical_buttons_state[j].curr_physical_state = physical_buttons_state[p_dev_config->buttons[i].physical_num].current_state;
763+
logical_buttons_state[j].curr_physical_state = physical_buttons_state[p_dev_config->buttons[j].physical_num].current_state;
764764

765765
LogicalButtonProcessState(&logical_buttons_state[j], pov_pos, p_dev_config, j);
766766
}

common_defines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
//#define DEBUG
1313

14-
#define FIRMWARE_VERSION 0x1605 // v1.6.0b5
14+
#define FIRMWARE_VERSION 0x1606 // v1.6.0b6
1515
#define USED_PINS_NUM 30 // constant for BluePill and BlackPill boards
1616
#define MAX_AXIS_NUM 8 // max 8
1717
#define MAX_BUTTONS_NUM 128 // power of 2, max 128

0 commit comments

Comments
 (0)