PER Firmware
Loading...
Searching...
No Matches
cooling.h File Reference
#include "common/can_library/generated/PDU.h"

Go to the source code of this file.

Classes

struct  cooling_request_t
 

Macros

#define GPS_SPEED_MOVING   2
 
#define MOTOR_COOLING_ENABLE_TEMP   60
 
#define MOTOR_COOLING_MAX_TEMP   100
 
#define BATT_COOLING_ENABLE_TEMP   30
 
#define BATT_PUMP_ON_TEMP_C   BATT_COOLING_ENABLE_TEMP
 
#define BATT_PUMP_OFF_TEMP_C   (BATT_COOLING_ENABLE_TEMP - 2)
 
#define BATT_FAN_ON_TEMP_C   BATT_COOLING_ENABLE_TEMP
 
#define BATT_FAN_OFF_TEMP_C   (BATT_COOLING_ENABLE_TEMP - 2)
 
#define MOTOR_PUMP_ON_TEMP_C   MOTOR_COOLING_ENABLE_TEMP
 
#define MOTOR_PUMP_OFF_TEMP_C   (MOTOR_COOLING_ENABLE_TEMP - 5)
 
#define MOTOR_FAN_ON_TEMP_C   MOTOR_COOLING_MAX_TEMP
 
#define MOTOR_FAN_OFF_TEMP_C   (MOTOR_COOLING_MAX_TEMP - 5)
 
#define MOTOR_FAN_STOP_ON_TEMP_C   MOTOR_COOLING_ENABLE_TEMP
 
#define MOTOR_FAN_STOP_OFF_TEMP_C   (MOTOR_COOLING_ENABLE_TEMP - 5)
 
#define BANGBANG_MIN_SWITCH_MS   1000
 

Functions

void coolingInit ()
 Initializes cooling_request struct values to 0.
 
void update_cooling_periodic ()
 Periodic function that sets switches and fan speeds based off of values in the cooling_request struct.
 
void cooling_driver_request_CALLBACK (can_data_t *p_can_data)
 Callback function for cooling_driver_request message sent from dashboard, updates values in cooling_request struct based off signal values.
 

Detailed Description

Author
Nicolas Vera (nvera.nosp@m.pae@.nosp@m.purdu.nosp@m.e.ed.nosp@m.u)
Version
0.1
Date
2024-2-29

Function Documentation

◆ cooling_driver_request_CALLBACK()

void cooling_driver_request_CALLBACK ( can_data_t * p_can_data)

Callback function for cooling_driver_request message sent from dashboard, updates values in cooling_request struct based off signal values.

Parameters
*msg_data_aCAN msg data
Returns

◆ coolingInit()

void coolingInit ( )

Initializes cooling_request struct values to 0.

Parameters

return

◆ update_cooling_periodic()

void update_cooling_periodic ( )

Periodic function that sets switches and fan speeds based off of values in the cooling_request struct.

Parameters

return