Red Bird Racing VCU v2
 
Loading...
Searching...
No Matches
Enums.hpp File Reference

Enumeration definitions for the VCU. More...

#include <stdint.h>
#include <can.h>
Include dependency graph for Enums.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum class  CarStatus : uint8_t { Init = 0 , Startin = 1 , Bussin = 2 , Drive = 3 }
 Main car status state machine. More...
 
enum class  PedalFault : uint8_t {
  None = 0x00 , DiffStart = 0x10 , DiffContinuing = 0x11 , DiffExceed100ms = 0x12 ,
  DiffResolved = 0x19 , ThrottleLow = 0x20 , ThrottleHigh = 0x29 , BrakeLow = 0x30 ,
  BrakeHigh = 0x39
}
 Pedal fault status codes. More...
 
enum class  BmsStatus : uint8_t {
  NoMsg = 0 , Waiting = 1 , Starting = 2 , Started = 3 ,
  Unused = 4
}
 BMS status. More...
 
enum class  McpIndex : uint8_t { Motor = 0 , Bms = 1 , Datalogger = 2 }
 MCP2515 instance indices. More...
 
enum class  StatusCanId : canid_t {
  CarMsg = 0x693 , StaCarChangeMsg = 0x694 , BrakeMsg = 0x695 , BmsMsg = 0x696 ,
  HallSensorMsg = 0x697
}
 CAN message IDs for status and brake debug. More...
 

Detailed Description

Enumeration definitions for the VCU.

Author
Planeson, Red Bird Racing
Version
1.3.1
Date
2026-02-09

Definition in file Enums.hpp.

Enumeration Type Documentation

◆ BmsStatus

enum class BmsStatus : uint8_t
strong

BMS status.

Represents the current state of the Battery Management System (BMS).

Enumerator
NoMsg 

No message received from BMS

Waiting 

BMS is in standby, waiting to start HV

Starting 

BMS is starting high voltage

Started 

BMS has started high voltage

Unused 

Unused status code

Definition at line 50 of file Enums.hpp.

◆ CarStatus

enum class CarStatus : uint8_t
strong

Main car status state machine.

Represents the current state of the car in the startup and drive sequence.

Enumerator
Init 

Just started the car

Startin 

Driver holds "Start" button and full brakes (transition state)

Bussin 

Buzzer active, driver can release "Start" and brakes (transition state)

Drive 

Ready to drive, Drive mode LED on, throttle enabled

Definition at line 19 of file Enums.hpp.

◆ McpIndex

enum class McpIndex : uint8_t
strong

MCP2515 instance indices.

Used to identify different MCP2515 CAN controller instances.

Enumerator
Motor 

Motor CAN MCP2515 instance

Bms 

BMS CAN MCP2515 instance

Datalogger 

Datalogger CAN MCP2515 instance

Definition at line 65 of file Enums.hpp.

◆ PedalFault

enum class PedalFault : uint8_t
strong

Pedal fault status codes.

Represents the current fault status related to pedal input.

Enumerator
None 

No fault detected

DiffStart 

>10% difference fault just started

DiffContinuing 

>10% difference fault is ongoing

DiffExceed100ms 

>10% difference fault exceeded 100ms

DiffResolved 

Difference fault resolved

ThrottleLow 

Throttle pedal below lower threshold

ThrottleHigh 

Throttle pedal above upper threshold

BrakeLow 

Brake pedal below lower threshold

BrakeHigh 

Brake pedal above upper threshold

Definition at line 32 of file Enums.hpp.

◆ StatusCanId

enum class StatusCanId : canid_t
strong

CAN message IDs for status and brake debug.

Used for sending car status and brake messages over CAN bus.

Enumerator
CarMsg 

Debug: car status message

StaCarChangeMsg 

Debug: car status change message

BrakeMsg 

Debug: brake status message

BmsMsg 

Debug: BMS status message

HallSensorMsg 

Debug: Hall sensor message

Definition at line 79 of file Enums.hpp.