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

Commit

Permalink
Corrected issue where 860C display buttons and other parts were selec…
Browse files Browse the repository at this point in the history
…ted as 850C
  • Loading branch information
casainho committed Apr 6, 2020
1 parent d8989b7 commit e82fa0f
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
6 changes: 3 additions & 3 deletions firmware/common/include/screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -573,9 +573,9 @@ extern volatile bool g_graphs_ui_update[3];
#endif

#if defined(SW102) || defined(DISPLAY_860C)
#if defined(SW102)
#ifdef SW102
#define SCREENFN_FORCE_LABELS buttons_get_m_state()
#elif defined(DISPLAY_860C)
#elif DISPLAY_860C
#define SCREENFN_FORCE_LABELS false
#endif
#define SCREENCLICK_START_EDIT M_CLICK
Expand All @@ -588,7 +588,7 @@ extern volatile bool g_graphs_ui_update[3];
#define SCREENCLICK_MOTOR_MAX_POWER_START ONOFFUP_LONG_CLICK
#define SCREENCLICK_MOTOR_MAX_POWER_STOP ONOFF_LONG_CLICK
#define SCREENCLICK_STREET_MODE ONOFFDOWN_LONG_CLICK
#elif defined(DISPLAY_850C)
#elif DISPLAY_850C
#define SCREENFN_FORCE_LABELS false
#define SCREENCLICK_START_EDIT ONOFF_CLICK
#define SCREENCLICK_STOP_EDIT ONOFF_CLICK
Expand Down
4 changes: 2 additions & 2 deletions firmware/common/src/buttons.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ uint32_t buttons_get_onoff_state(void) {
}

uint32_t buttons_get_m_state(void) {
#if defined(DISPLAY_850C)
#ifdef DISPLAY_850C
return 0; // no M button on 850C
#elif defined(DISPLAY_860C)
#elif DISPLAY_860C
return GPIO_ReadInputDataBit(BUTTON_M__PORT, BUTTON_M__PIN) != 0 ?
0 : 1;
#endif
Expand Down
5 changes: 3 additions & 2 deletions firmware/common/src/mainscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,10 @@ Field custom1 = FIELD_CUSTOMIZABLE_PTR(&ui_vars.field_selectors[0], customizable
Field bootHeading = FIELD_DRAWTEXT_RO(_S("OpenSource EBike", "OS-EBike")),
bootURL_1 = FIELD_DRAWTEXT_RO(_S("www.github.com/", "Keep pedal")),
bootURL_2 = FIELD_DRAWTEXT_RO(_S("OpenSource-EBike-Firmware", "free")),
#if defined(DISPLAY_850C)

#ifdef DISPLAY_850C
bootFirmwareVersion = FIELD_DRAWTEXT_RO("850C firmware version:"),
#elif defined(DISPLAY_860C)
#elif DISPLAY_860C
bootFirmwareVersion = FIELD_DRAWTEXT_RO("860C firmware version:"),
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mkdir -p $RELEASE_FOLDER
cd 860C_850C/src/
# standard version 850C
make -f Makefile clean
rm -R common/src
rm -R ../common/src
make -f Makefile VERSION=$VERSION
cp main.bin $RELEASE_FOLDER/850C_v$VERSION.bin
cd ../..
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mkdir -p $RELEASE_FOLDER
cd 860C_850C/src/
# version 850C bootloader
make -f Makefile clean
rm -R common/src
rm -R ../common/src
make -f Makefile VERSION=$VERSION DISPLAY_VERSION="850C_BOOTLOADER"
cp main.bin $RELEASE_FOLDER/850C_v$VERSION-bootloader.bin
cd ../..
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mkdir -p $RELEASE_FOLDER
cd 860C_850C/src/
# version 860C bootloader
make -f Makefile clean
rm -R common/src
rm -R ../common/src
make -f Makefile VERSION=$VERSION DISPLAY_VERSION="860C_BOOTLOADER"
cp main.bin $RELEASE_FOLDER/860C_v$VERSION-bootloader.bin
cd ../..
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions firmware/release_version-all.sh → firmware/release-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ cd ..
cd 860C_850C/src/
# standard version 850C
make -f Makefile clean
rm -R common/src
rm -R ../common/src
make -f Makefile VERSION=$VERSION
cp main.bin $RELEASE_FOLDER/850C_v$VERSION.bin

# version 850C bootloader
make -f Makefile clean
rm -R common/src
rm -R ../common/src
make -f Makefile VERSION=$VERSION DISPLAY_VERSION="850C_BOOTLOADER"
cp main.bin $RELEASE_FOLDER/850C_v$VERSION-bootloader.bin

# version 860C bootloader
make -f Makefile clean
rm -R common/src
rm -R ../common/src
make -f Makefile VERSION=$VERSION DISPLAY_VERSION="860C_BOOTLOADER"
cp main.bin $RELEASE_FOLDER/860C_v$VERSION-bootloader.bin
cd ../..
Expand Down

0 comments on commit e82fa0f

Please sign in to comment.