Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit e82fa0f

Browse files
committed
Corrected issue where 860C display buttons and other parts were selected as 850C
1 parent d8989b7 commit e82fa0f

8 files changed

Lines changed: 14 additions & 13 deletions

File tree

firmware/common/include/screen.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,9 @@ extern volatile bool g_graphs_ui_update[3];
573573
#endif
574574

575575
#if defined(SW102) || defined(DISPLAY_860C)
576-
#if defined(SW102)
576+
#ifdef SW102
577577
#define SCREENFN_FORCE_LABELS buttons_get_m_state()
578-
#elif defined(DISPLAY_860C)
578+
#elif DISPLAY_860C
579579
#define SCREENFN_FORCE_LABELS false
580580
#endif
581581
#define SCREENCLICK_START_EDIT M_CLICK
@@ -588,7 +588,7 @@ extern volatile bool g_graphs_ui_update[3];
588588
#define SCREENCLICK_MOTOR_MAX_POWER_START ONOFFUP_LONG_CLICK
589589
#define SCREENCLICK_MOTOR_MAX_POWER_STOP ONOFF_LONG_CLICK
590590
#define SCREENCLICK_STREET_MODE ONOFFDOWN_LONG_CLICK
591-
#elif defined(DISPLAY_850C)
591+
#elif DISPLAY_850C
592592
#define SCREENFN_FORCE_LABELS false
593593
#define SCREENCLICK_START_EDIT ONOFF_CLICK
594594
#define SCREENCLICK_STOP_EDIT ONOFF_CLICK

firmware/common/src/buttons.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ uint32_t buttons_get_onoff_state(void) {
6161
}
6262

6363
uint32_t buttons_get_m_state(void) {
64-
#if defined(DISPLAY_850C)
64+
#ifdef DISPLAY_850C
6565
return 0; // no M button on 850C
66-
#elif defined(DISPLAY_860C)
66+
#elif DISPLAY_860C
6767
return GPIO_ReadInputDataBit(BUTTON_M__PORT, BUTTON_M__PIN) != 0 ?
6868
0 : 1;
6969
#endif

firmware/common/src/mainscreen.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,10 @@ Field custom1 = FIELD_CUSTOMIZABLE_PTR(&ui_vars.field_selectors[0], customizable
231231
Field bootHeading = FIELD_DRAWTEXT_RO(_S("OpenSource EBike", "OS-EBike")),
232232
bootURL_1 = FIELD_DRAWTEXT_RO(_S("www.github.com/", "Keep pedal")),
233233
bootURL_2 = FIELD_DRAWTEXT_RO(_S("OpenSource-EBike-Firmware", "free")),
234-
#if defined(DISPLAY_850C)
234+
235+
#ifdef DISPLAY_850C
235236
bootFirmwareVersion = FIELD_DRAWTEXT_RO("850C firmware version:"),
236-
#elif defined(DISPLAY_860C)
237+
#elif DISPLAY_860C
237238
bootFirmwareVersion = FIELD_DRAWTEXT_RO("860C firmware version:"),
238239
#endif
239240

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ mkdir -p $RELEASE_FOLDER
2020
cd 860C_850C/src/
2121
# standard version 850C
2222
make -f Makefile clean
23-
rm -R common/src
23+
rm -R ../common/src
2424
make -f Makefile VERSION=$VERSION
2525
cp main.bin $RELEASE_FOLDER/850C_v$VERSION.bin
2626
cd ../..

firmware/release_version-850C_bootloader.sh renamed to firmware/release-850C_bootloader.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ mkdir -p $RELEASE_FOLDER
2020
cd 860C_850C/src/
2121
# version 850C bootloader
2222
make -f Makefile clean
23-
rm -R common/src
23+
rm -R ../common/src
2424
make -f Makefile VERSION=$VERSION DISPLAY_VERSION="850C_BOOTLOADER"
2525
cp main.bin $RELEASE_FOLDER/850C_v$VERSION-bootloader.bin
2626
cd ../..

firmware/release_version-860C_bootloader.sh renamed to firmware/release-860C_bootloader.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ mkdir -p $RELEASE_FOLDER
2020
cd 860C_850C/src/
2121
# version 860C bootloader
2222
make -f Makefile clean
23-
rm -R common/src
23+
rm -R ../common/src
2424
make -f Makefile VERSION=$VERSION DISPLAY_VERSION="860C_BOOTLOADER"
2525
cp main.bin $RELEASE_FOLDER/860C_v$VERSION-bootloader.bin
2626
cd ../..
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ cd ..
2626
cd 860C_850C/src/
2727
# standard version 850C
2828
make -f Makefile clean
29-
rm -R common/src
29+
rm -R ../common/src
3030
make -f Makefile VERSION=$VERSION
3131
cp main.bin $RELEASE_FOLDER/850C_v$VERSION.bin
3232

3333
# version 850C bootloader
3434
make -f Makefile clean
35-
rm -R common/src
35+
rm -R ../common/src
3636
make -f Makefile VERSION=$VERSION DISPLAY_VERSION="850C_BOOTLOADER"
3737
cp main.bin $RELEASE_FOLDER/850C_v$VERSION-bootloader.bin
3838

3939
# version 860C bootloader
4040
make -f Makefile clean
41-
rm -R common/src
41+
rm -R ../common/src
4242
make -f Makefile VERSION=$VERSION DISPLAY_VERSION="860C_BOOTLOADER"
4343
cp main.bin $RELEASE_FOLDER/860C_v$VERSION-bootloader.bin
4444
cd ../..

0 commit comments

Comments
 (0)