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

Commit f32d8a3

Browse files
committed
Corrections after previous merge. Changed to version 1.1.0
1 parent be25213 commit f32d8a3

4 files changed

Lines changed: 23 additions & 4 deletions

File tree

firmware/common/Makefile.common

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
VERSION_NUM := 25
99

1010
# This is the user visible string for the version
11-
VERSION_STRING := 1.0.0
11+
VERSION_STRING := 1.1.0
1212

1313
# This is the expected version of the motor firmware. Display will stop to work with correct TSDZ2 firmware version
1414
TSDZ2_FIRMWARE_MAJOR := 1
15-
TSDZ2_FIRMWARE_MINOR := 0
15+
TSDZ2_FIRMWARE_MINOR := 1
1616

1717
CFLAGS += -DVERSION_STRING=\"$(VERSION_STRING)\" -DTSDZ2_FIRMWARE_MAJOR=\"$(TSDZ2_FIRMWARE_MAJOR)\" -DTSDZ2_FIRMWARE_MINOR=\"$(TSDZ2_FIRMWARE_MINOR)\"

firmware/common/include/eeprom.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
// For compatible changes, just add new fields at the end of the table (they will be inited to 0xff for old eeprom images). For incompatible
1717
// changes bump up EEPROM_MIN_COMPAT_VERSION and the user's EEPROM settings will be discarded.
18-
#define EEPROM_MIN_COMPAT_VERSION 0x3C
19-
#define EEPROM_VERSION 0x3C
18+
#define EEPROM_MIN_COMPAT_VERSION 0x3D
19+
#define EEPROM_VERSION 0x3D
2020

2121
typedef struct {
2222
graph_auto_max_min_t auto_max_min;

firmware/common/src/eeprom.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,20 @@ const eeprom_data_t m_eeprom_data_defaults = {
279279
.ui8_torque_sensor_adc_threshold = DEFAULT_TORQUE_SENSOR_ADC_THRESHOLD,
280280
.ui8_coast_brake_enable = DEFAULT_COAST_BRAKE_ENABLE,
281281

282+
#ifndef SW102
282283
.ui8_trip_a_auto_reset = DEFAULT_VALUE_TRIP_AUTO_RESET_ENABLE,
283284
.ui16_trip_a_auto_reset_hours = DEFAULT_VALUE_TRIP_A_AUTO_RESET_HOURS,
285+
#endif
286+
284287
.ui32_trip_a_distance_x1000 = DEFAULT_VALUE_TRIP_DISTANCE,
285288
.ui32_trip_a_time = DEFAULT_VALUE_TRIP_TIME,
286289
.ui16_trip_a_max_speed_x10 = DEFAULT_VALUE_TRIP_MAX_SPEED,
287290

291+
#ifndef SW102
288292
.ui8_trip_b_auto_reset = DEFAULT_VALUE_TRIP_AUTO_RESET_ENABLE,
289293
.ui16_trip_b_auto_reset_hours = DEFAULT_VALUE_TRIP_B_AUTO_RESET_HOURS,
294+
#endif
295+
290296
.ui32_trip_b_distance_x1000 = DEFAULT_VALUE_TRIP_DISTANCE,
291297
.ui32_trip_b_time = DEFAULT_VALUE_TRIP_TIME,
292298
.ui16_trip_b_max_speed_x10 = DEFAULT_VALUE_TRIP_MAX_SPEED,
@@ -812,25 +818,31 @@ void eeprom_write_variables(void) {
812818
m_eeprom_data.ui8_coast_brake_enable =
813819
ui_vars->ui8_coast_brake_enable;
814820

821+
#ifndef SW102
815822
m_eeprom_data.ui8_trip_a_auto_reset =
816823
ui_vars->ui8_trip_a_auto_reset;
817824
m_eeprom_data.ui16_trip_a_auto_reset_hours =
818825
ui_vars->ui16_trip_a_auto_reset_hours;
819826
m_eeprom_data.ui32_trip_a_last_update_time =
820827
ui_vars->ui32_trip_a_last_update_time;
828+
#endif
829+
821830
m_eeprom_data.ui32_trip_a_distance_x1000 =
822831
ui_vars->ui32_trip_a_distance_x1000;
823832
m_eeprom_data.ui32_trip_a_time =
824833
ui_vars->ui32_trip_a_time;
825834
m_eeprom_data.ui16_trip_a_max_speed_x10 =
826835
ui_vars->ui16_trip_a_max_speed_x10;
827836

837+
#ifndef SW102
828838
m_eeprom_data.ui8_trip_b_auto_reset =
829839
ui_vars->ui8_trip_b_auto_reset;
830840
m_eeprom_data.ui16_trip_b_auto_reset_hours =
831841
ui_vars->ui16_trip_b_auto_reset_hours;
832842
m_eeprom_data.ui32_trip_b_last_update_time =
833843
ui_vars->ui32_trip_b_last_update_time;
844+
#endif
845+
834846
m_eeprom_data.ui32_trip_b_distance_x1000 =
835847
ui_vars->ui32_trip_b_distance_x1000;
836848
m_eeprom_data.ui32_trip_b_time =

firmware/common/src/mainscreen.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "configscreen.h"
2525
#include "state.h"
2626
#include "timer.h"
27+
#include "rtc.h"
2728
#ifdef SW102
2829
#include "peer_manager.h"
2930
#endif
@@ -1284,9 +1285,12 @@ void TripMemoriesReset(void) {
12841285
if (ui8_g_configuration_trip_a_reset) {
12851286
ui8_g_configuration_trip_a_reset = 0;
12861287

1288+
#ifndef SW102
12871289
uint32_t current_time = RTC_GetCounter();
12881290

12891291
rt_vars.ui32_trip_a_last_update_time = current_time;
1292+
#endif
1293+
12901294
rt_vars.ui32_trip_a_distance_x1000 = 0;
12911295
rt_vars.ui32_trip_a_time = 0;
12921296
rt_vars.ui16_trip_a_avg_speed_x10 = 0;
@@ -1296,9 +1300,12 @@ void TripMemoriesReset(void) {
12961300
if (ui8_g_configuration_trip_b_reset) {
12971301
ui8_g_configuration_trip_b_reset = 0;
12981302

1303+
#ifndef SW102
12991304
uint32_t current_time = RTC_GetCounter();
13001305

13011306
rt_vars.ui32_trip_b_last_update_time = current_time;
1307+
#endif
1308+
13021309
rt_vars.ui32_trip_b_distance_x1000 = 0;
13031310
rt_vars.ui32_trip_b_time = 0;
13041311
rt_vars.ui16_trip_b_avg_speed_x10 = 0;

0 commit comments

Comments
 (0)