Merge pull request #346 from afzalmam/dev_fw_5_03

PAS: add constant torque control type
This commit is contained in:
Benjamin Vedder 2021-10-11 10:08:24 +02:00 committed by GitHub
commit b6eb5852aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -207,6 +207,9 @@ static THD_FUNCTION(pas_thread, arg) {
}
}
break;
case PAS_CTRL_TYPE_CONSTANT_TORQUE:
output = pedal_rpm > config.pedal_rpm_start ? config.current_scaling : 0;
break;
default:
break;
}

View File

@ -9,7 +9,7 @@
// Constants
#define MCCONF_SIGNATURE 3706516163
#define APPCONF_SIGNATURE 1531606261
#define APPCONF_SIGNATURE 763356168
// Functions
int32_t confgenerator_serialize_mcconf(uint8_t *buffer, const mc_configuration *conf);

View File

@ -574,7 +574,8 @@ typedef enum {
// PAS control types
typedef enum {
PAS_CTRL_TYPE_NONE = 0,
PAS_CTRL_TYPE_CADENCE
PAS_CTRL_TYPE_CADENCE,
PAS_CTRL_TYPE_CONSTANT_TORQUE
} pas_control_type;
// PAS sensor types