Skip to content

Commit cb3d8d6

Browse files
committed
Compile test: Add test for DISPLAY_TYPE_BAFANG
Also add display_bafang.* to CMakeLists.txt.
1 parent 65e5fa2 commit cb3d8d6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Arduino_Pedelec_Controller/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ set(${FIRMWARE_NAME}_SRCS # Source code
4141
display.h
4242
display_backlight.cpp
4343
display_backlight.h
44+
display_bafang.cpp
45+
display_bafang.h
4446
display_kingmeter.cpp
4547
display_kingmeter.h
4648
ds1307.cpp

tools/compile_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def write_config_h(filename=CONFIG_H,
9797
f.write('#define DISPLAY_TYPE_KINGMETER_618U (1<<4) // King-Meter 618U protocol (KM5s, EBS-LCD2, J-LCD, SW-LCD)\n')
9898
f.write('#define DISPLAY_TYPE_KINGMETER_901U (1<<8) // King-Meter 901U protocol (KM5s)\n')
9999
f.write('#define DISPLAY_TYPE_KINGMETER (DISPLAY_TYPE_KINGMETER_618U|DISPLAY_TYPE_KINGMETER_901U)\n')
100+
f.write('#define DISPLAY_TYPE_BAFANG (1<<9)\n')
100101
f.write('\n')
101102
f.write('#define DISPLAY_TYPE DISPLAY_TYPE_' + display_type + ' //Set your display type here. CHANGES ONLY HERE!<-----------------------------\n')
102103
f.write('\n')
@@ -333,7 +334,8 @@ def test_display_types(self):
333334
'KINGMETER_618U',
334335
'KINGMETER_901U',
335336
'BMS',
336-
'BMS3']:
337+
'BMS3',
338+
'BAFANG']:
337339
self.build_firmware(disp_type, display_type=disp_type)
338340

339341
def test_16x2_serial_with_dynamic_backlight(self):

0 commit comments

Comments
 (0)