Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion include/VCF_Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

/* Interface and system data structs */
using VCFData_sInstance = etl::singleton<VCFData_s>;
using VCRData_sInstance = etl::singleton<VCRData_s>;

/* IOExpander setup */
using IOExpanderInstance = etl::singleton<MCP23017>;
Expand Down
2 changes: 1 addition & 1 deletion lib/interfaces/include/NeopixelController.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class NeopixelController
void init_neopixels();
void dim_neopixels();
void set_neopixel(uint16_t id, uint32_t c);
void refresh_neopixels(VCFData_s &vcf_data, VCRData_s &vcr_data, CANInterfaces &interfaces);
void refresh_neopixels(VCFData_s &vcf_data, CANInterfaces &interfaces);
void set_neopixel_color(LED_ID_e led, LED_color_e color);

private:
Expand Down
4 changes: 2 additions & 2 deletions lib/interfaces/src/NeopixelController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void NeopixelController::set_neopixel(uint16_t id, uint32_t c) {
_neopixels.setPixelColor(id, c);
}

void NeopixelController::refresh_neopixels(VCFData_s &vcf_data, VCRData_s &vcr_data, CANInterfaces &interfaces) {
void NeopixelController::refresh_neopixels(VCFData_s &vcf_data, CANInterfaces &interfaces) {

// If we are in pedals recalibration state, LIGHT UP DASHBOARD ALL RED.
if (interfaces.vcr_interface.is_in_pedals_calibration_state()) {
Expand Down Expand Up @@ -135,7 +135,7 @@ void NeopixelController::refresh_neopixels(VCFData_s &vcf_data, VCRData_s &vcr_d
set_neopixel_color(LED_ID_e::BMS, interfaces.dash_interface.bms_ok ? LED_color_e::GREEN : LED_color_e::RED);
set_neopixel_color(LED_ID_e::MC_ERR, interfaces.vcr_interface.get_inverter_error() ? LED_color_e::RED : LED_color_e::GREEN);
set_neopixel_color(LED_ID_e::RDY_DRIVE, ready_drive_color);
set_neopixel_color(LED_ID_e::GLV, vcr_data.interface_data.current_sensor_data.twentyfour_volt_sensor > glv_critical_voltage ? LED_color_e::GREEN : LED_color_e::YELLOW); // No sensor there yet
set_neopixel_color(LED_ID_e::GLV, LED_color_e::OFF); // No sensor there yet
set_neopixel_color(LED_ID_e::TORQUE_MODE, torque_mode_color);

_neopixels.show();
Expand Down
1 change: 0 additions & 1 deletion src/VCF_Globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

/* Interface and system data structs */
VCFData_s vcf_data = {};
VCRData_s vcr_data = {};

qindesign::network::EthernetUDP VCF_socket;
qindesign::network::EthernetUDP VCR_socket;
3 changes: 1 addition & 2 deletions src/VCF_Tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ HT_TASK::TaskResponse init_neopixels_task(const unsigned long& sys_micros, const

HT_TASK::TaskResponse run_update_neopixels_task(const unsigned long& sys_micros, const HT_TASK::TaskInfo& task_info)
{
NeopixelControllerInstance::instance().refresh_neopixels(VCFData_sInstance::instance(), VCRData_sInstance::instance(), VCFCANInterfaceImpl::CANInterfacesInstance::instance());
NeopixelControllerInstance::instance().refresh_neopixels(VCFData_sInstance::instance(), VCFCANInterfaceImpl::CANInterfacesInstance::instance());
return HT_TASK::TaskResponse::YIELD;
}

Expand Down Expand Up @@ -537,7 +537,6 @@ void setup_all_interfaces() {
});

EthernetIPDefsInstance::create();
VCRData_sInstance::create();
VCFData_sInstance::create();

// Create pedals singleton
Expand Down