Skip to content

Commit b6eb585

Browse files
authored
Merge pull request vedderb#346 from afzalmam/dev_fw_5_03
PAS: add constant torque control type
2 parents 583f712 + b1ec844 commit b6eb585

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

applications/app_pas.c

+3
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ static THD_FUNCTION(pas_thread, arg) {
207207
}
208208
}
209209
break;
210+
case PAS_CTRL_TYPE_CONSTANT_TORQUE:
211+
output = pedal_rpm > config.pedal_rpm_start ? config.current_scaling : 0;
212+
break;
210213
default:
211214
break;
212215
}

confgenerator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
// Constants
1111
#define MCCONF_SIGNATURE 3706516163
12-
#define APPCONF_SIGNATURE 1531606261
12+
#define APPCONF_SIGNATURE 763356168
1313

1414
// Functions
1515
int32_t confgenerator_serialize_mcconf(uint8_t *buffer, const mc_configuration *conf);

datatypes.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,8 @@ typedef enum {
574574
// PAS control types
575575
typedef enum {
576576
PAS_CTRL_TYPE_NONE = 0,
577-
PAS_CTRL_TYPE_CADENCE
577+
PAS_CTRL_TYPE_CADENCE,
578+
PAS_CTRL_TYPE_CONSTANT_TORQUE
578579
} pas_control_type;
579580

580581
// PAS sensor types

0 commit comments

Comments
 (0)