Midnight Sun Firmware
Loading...
Searching...
No Matches
GlobalEnums

Global Enum definition for sharing between projects. More...

Macros

#define BMS_FAULT_OVERVOLTAGE_MASK   (1U << BMS_FAULT_OVERVOLTAGE)
 BMS Overvoltage fault mask.
 
#define BMS_FAULT_UNBALANCE_MASK   (1U << BMS_FAULT_UNBALANCE)
 BMS Unbalanced fault mask.
 
#define BMS_FAULT_OVERTEMP_AMBIENT_MASK   (1U << BMS_FAULT_OVERTEMP_AMBIENT)
 BMS Ambient temperature fault mask.
 
#define BMS_FAULT_COMMS_LOSS_AFE_MASK   (1U << BMS_FAULT_COMMS_LOSS_AFE)
 BMS Communication lost with AFEs fault mask.
 
#define BMS_FAULT_COMMS_LOSS_CURR_SENSE_MASK   (1U << BMS_FAULT_COMMS_LOSS_CURR_SENSE)
 BMS Communication lost with current sense fault mask.
 
#define BMS_FAULT_OVERTEMP_CELL_MASK   (1U << BMS_FAULT_OVERTEMP_CELL)
 BMS Cell temperature fault mask.
 
#define BMS_FAULT_OVERCURRENT_MASK   (1U << BMS_FAULT_OVERCURRENT)
 BMS Overcurrent fault mask.
 
#define BMS_FAULT_UNDERVOLTAGE_MASK   (1U << BMS_FAULT_UNDERVOLTAGE)
 BMS Undervoltage fault mask.
 
#define BMS_FAULT_KILLSWITCH_MASK   (1U << BMS_FAULT_KILLSWITCH)
 BMS Killswitch fault mask.
 
#define BMS_FAULT_RELAY_CLOSE_FAILED_MASK   (1U << BMS_FAULT_RELAY_CLOSE_FAILED)
 BMS Relay failed to close fault mask.
 
#define BMS_FAULT_DISCONNECTED_MASK   (1U << BMS_FAULT_DISCONNECTED)
 BMS Disconnected fault mask.
 
#define BMS_FAULT_HIGH_PRIORITY_MASK   (1U << 15U)
 BMS High priority fault mask.
 
#define BMS_FAULT_LOW_PRIORITY_MASK   (1U << 14U)
 BMS Low priority fault mask.
 
#define EE_STEERING_CC_INCREASE_MASK   (1U << EE_STEERING_CC_INCREASE_BIT)
 Increase cruise control speed mask.
 
#define EE_STEERING_CC_DECREASE_MASK   (1U << EE_STEERING_CC_DECREASE_BIT)
 Decrease cruise control speed mask.
 
#define EE_STEERING_CC_TOGGLE_MASK   (1U << EE_STEERING_CC_TOGGLE_BIT)
 Toggle cruise control mask.
 

Enumerations

enum  DriveState {
  VEHICLE_NEUTRAL , VEHICLE_DRIVE , VEHICLE_REVERSE , VEHICLE_CRUISE ,
  VEHICLE_BRAKE
}
 Vehicle drive states. More...
 
enum  BmsRelayState { BMS_RELAY_STATE_CLOSE , BMS_RELAY_STATE_FAULT , NUM_BMS_RELAY_STATES }
 Battery relay states. More...
 
enum  BmsFault {
  BMS_FAULT_OVERVOLTAGE , BMS_FAULT_UNBALANCE , BMS_FAULT_OVERTEMP_AMBIENT , BMS_FAULT_COMMS_LOSS_AFE ,
  BMS_FAULT_COMMS_LOSS_CURR_SENSE , BMS_FAULT_OVERTEMP_CELL , BMS_FAULT_OVERCURRENT , BMS_FAULT_UNDERVOLTAGE ,
  BMS_FAULT_KILLSWITCH , BMS_FAULT_RELAY_CLOSE_FAILED , BMS_FAULT_DISCONNECTED
}
 Battery fault definitions. More...
 
enum  CCSteeringLights { CC_STEERING_LIGHTS_OFF_STATE , CC_STEERING_LIGHTS_LEFT_STATE , CC_STEERING_LIGHTS_RIGHT_STATE , NUM_EE_STEERING_LIGHTS }
 Steering lights definitions. More...
 
enum  CCSteeringCruiseControl { CC_STEERING_CRUISE_CONTROL_DECREASE_BIT = 0 , CC_STEERING_CRUISE_CONTROL_INCREASE_BIT , CC_STEERING_CRUISE_CONTROL_TOGGLE_BIT }
 Steering cruise control definitions. More...
 
enum  PDPowerState { EE_POWER_OFF_STATE , EE_POWER_PRECHARGE_STATE , EE_POWER_DRIVE_STATE , EE_POWER_FAULT_STATE }
 Power distribution power state definitions. More...
 

Detailed Description

Global Enum definition for sharing between projects.

Enumeration Type Documentation

◆ BmsFault

enum BmsFault

Battery fault definitions.

Enumerator
BMS_FAULT_OVERVOLTAGE 

BMS Overvoltage fault

BMS_FAULT_UNBALANCE 

BMS Unbalanced fault

BMS_FAULT_OVERTEMP_AMBIENT 

BMS Ambient temperature fault

BMS_FAULT_COMMS_LOSS_AFE 

BMS Communication lost with AFEs fault

BMS_FAULT_COMMS_LOSS_CURR_SENSE 

BMS Communication lost with current sense fault

BMS_FAULT_OVERTEMP_CELL 

BMS Cell temperature fault

BMS_FAULT_OVERCURRENT 

BMS Overcurrent fault

BMS_FAULT_UNDERVOLTAGE 

BMS Undervoltage fault

BMS_FAULT_KILLSWITCH 

BMS Killswitch fault

BMS_FAULT_RELAY_CLOSE_FAILED 

BMS Relay failed to close fault

BMS_FAULT_DISCONNECTED 

BMS Disconnected fault

◆ BmsRelayState

Battery relay states.

Enumerator
BMS_RELAY_STATE_CLOSE 

BMS Relays closed

BMS_RELAY_STATE_FAULT 

BMS Relays fault

NUM_BMS_RELAY_STATES 

Number of BMS Relay states

◆ CCSteeringCruiseControl

Steering cruise control definitions.

Enumerator
CC_STEERING_CRUISE_CONTROL_DECREASE_BIT 

Decrease cruise control speed

CC_STEERING_CRUISE_CONTROL_INCREASE_BIT 

Increase cruise control speed

CC_STEERING_CRUISE_CONTROL_TOGGLE_BIT 

Toggle cruise control

◆ CCSteeringLights

Steering lights definitions.

Enumerator
CC_STEERING_LIGHTS_OFF_STATE 

Steering lights off turn

CC_STEERING_LIGHTS_LEFT_STATE 

Steering light left turn

CC_STEERING_LIGHTS_RIGHT_STATE 

Steering light right turn

NUM_EE_STEERING_LIGHTS 

Number of steering light states

◆ DriveState

enum DriveState

Vehicle drive states.

Enumerator
VEHICLE_NEUTRAL 

Neutral state

VEHICLE_DRIVE 

Drive state

VEHICLE_REVERSE 

Reverse state

VEHICLE_CRUISE 

Cruise Control state

VEHICLE_BRAKE 

Brake state

◆ PDPowerState

Power distribution power state definitions.

Enumerator
EE_POWER_OFF_STATE 

Power distribution off state

EE_POWER_PRECHARGE_STATE 

Power distribution precharge state

EE_POWER_DRIVE_STATE 

Power distribution drive state

EE_POWER_FAULT_STATE 

Power distribution fault state