Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update faultstate #312

Merged
merged 160 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
54b4fa4
added basics of multi-bus support to CAN driver
babusid Aug 5, 2022
0369458
New CAN data structure
babusid Aug 6, 2022
89b6b76
- Compat fixes for applications with new driver data type and functio…
babusid Aug 6, 2022
48a8e2f
- Compat layer for legacy MC driver
babusid Aug 7, 2022
a714342
reconfigured enum and implemented lookup table
babusid Aug 13, 2022
87c5f28
implemented LUT and build fixes
babusid Aug 13, 2022
b35df36
- Moved LUT into the C file to fix linker issue
babusid Sep 17, 2022
ec302d9
- changed file organization
babusid Sep 18, 2022
478cbf5
changed lookup table to be a sparse array, changed enum to fit
babusid Sep 24, 2022
214490c
implemented read functionality
babusid Sep 24, 2022
a77f10d
more appropriate error checking in CANbus_Send
babusid Oct 3, 2022
1dd0a4c
- fixed temperature CAN ID
babusid Oct 8, 2022
abd795a
Small fixes
Cam0Cow Oct 15, 2022
2a0999c
Started CANbus test file
Cam0Cow Oct 15, 2022
05c0ce3
Added some tests for repeated blocking and non-blocking CANbus_Send
Cam0Cow Oct 15, 2022
77464fc
Some changes to test
Cam0Cow Oct 22, 2022
1abaee5
Put CAN1 and CAN3 in loopback mode for testing
Cam0Cow Oct 22, 2022
ab1fc37
Connected CAN1 and CAN3 to test read/writes
Cam0Cow Oct 29, 2022
9f5d6dd
Objectives for ReadTritium Rewrite
Arnav-Surjan Oct 29, 2022
621ae68
11/5 - AM
Arnav-Surjan Nov 5, 2022
46632bc
Merge branch 'master' into ReadTritium_Rewrite
Arnav-Surjan Nov 5, 2022
f9f2001
11/5 - PM
Arnav-Surjan Nov 5, 2022
bfcde7a
Merge branch 'CAN_Driver_MultiBus' into ReadTritium_Rewrite
Arnav-Surjan Nov 12, 2022
2011648
Implemented error handling
millergage Nov 12, 2022
a44f414
Modified Minion_Read_Input to read inputs and outputs and renamed to …
NathanielDelgado Nov 12, 2022
7adf9ad
Added test for testing the ignition contactor task
NathanielDelgado Nov 12, 2022
478e97d
Updated code due to the Minion Read function rewrite
NathanielDelgado Nov 12, 2022
c0a693b
Removed unneed error
NathanielDelgado Nov 12, 2022
92f689e
Merge branch 'master' into ReadTritium_Rewrite
babusid Dec 2, 2022
53a3846
Removed unneeded error and shortened error name
NathanielDelgado Dec 3, 2022
37df8bd
Fixed tritium error handling. Added velocity read and getter capabili…
Arnav-Surjan Dec 3, 2022
f6cbc9e
added if-statement to skip T_NONE errors
millergage Dec 3, 2022
001074a
for gage
Arnav-Surjan Dec 3, 2022
594e7ae
Added fault state handling.
Arnav-Surjan Dec 3, 2022
7a0bee9
Deleted old motor controller file and header file, and mentions of he…
Arnav-Surjan Dec 4, 2022
ddfe23a
fixed velocity conversions to multiplying fixed point value by ten in…
millergage Dec 7, 2022
33923fd
Implelemted motor controller restart function in ReadTritium, use thi…
millergage Dec 7, 2022
7183218
Made changes from design review, including using chargingDisable in t…
KnockbackNemo Dec 10, 2022
bc73d09
Merge branch 'master' into ReadTritium_Rewrite
babusid Dec 25, 2022
ee75c9e
master version of CAN driver
babusid Dec 25, 2022
cbd1b56
fixed restart, changed CAN driver slightly. Commented out old updateV…
babusid Dec 25, 2022
42f99e1
readcarcan into test
babusid Dec 25, 2022
e326375
Merge branch 'master' into minion-driver-update
babusid Dec 25, 2022
b8314d0
Merge branch 'minion-driver-update' into test
babusid Dec 25, 2022
cd8aff5
erged updatevelocity_rewrite
diyarajon Jan 14, 2023
0a95ef0
verified all FSM transitions in Test_SendTritium on renode simulation…
IshDeshpa Jan 16, 2023
b5c269c
fixed SendTritium test float printing
Cam0Cow Jan 21, 2023
0aa302a
fixed can msg construction
diyarajon Jan 21, 2023
729a1a2
fixed can message memory accesses for reading and sending to tritium
IshDeshpa Jan 28, 2023
6082312
fixed map function and removed magic number usage, also fixed scope m…
IshDeshpa Mar 18, 2023
a0cb500
bye bye old sim
babusid Mar 25, 2023
54b613b
Merge branch 'master' into beta_test_0
babusid Mar 25, 2023
a128424
Merge branch 'master' into beta_test_0
babusid Mar 25, 2023
46078ed
Changed Fault State, added exception struct, general assertion functi…
diyarajon Apr 1, 2023
33532be
updated EnterFaultState with prio based switch case. combined ArrayMo…
diyarajon Apr 8, 2023
80243c8
wrote callback functions for priority 2
diyarajon Apr 8, 2023
5b450ff
wrote assert function for tritium
diyarajon Apr 8, 2023
c3af4b2
fixed function pointer implementation, added h files, unused variables
diyarajon Apr 8, 2023
0ad4813
Moved Faultstate mutex post, fixed a conditional for callbacks, added…
KnockbackNemo May 1, 2023
9f549dc
Renamed _assertError to assertExceptionError, had the exception callb…
KnockbackNemo Jun 4, 2023
cbae147
Merge branch 'master' into update_faultstate
KnockbackNemo Jun 5, 2023
8cf3052
Fixed a couple more merge conflicts.
KnockbackNemo Jun 5, 2023
5ed787d
Removed delay in fault state main thread.
KnockbackNemo Jun 7, 2023
789a067
Created test file for the updated fault state with exception levels w…
KnockbackNemo Jun 9, 2023
4a0abb1
Added assertOSError test.
KnockbackNemo Jun 10, 2023
272e612
Attempted to add a Faultstate test for ReadTritium using the FaultThr…
KnockbackNemo Jun 11, 2023
a88c07c
Added draft of ReadCarCAN Exception test to FaultThread test.
KnockbackNemo Jun 11, 2023
7842b7d
Fixed build by adding header file and small mistakes.
KnockbackNemo Jun 11, 2023
cd27e54
printf debug
KnockbackNemo Jun 11, 2023
0088647
printf now working!
IshDeshpa Jun 11, 2023
82dbcca
Changed the fault state exception assertion mutex to a binary semapho…
KnockbackNemo Jun 13, 2023
32b1eed
Added missing calls to delete tasks for the tests.
KnockbackNemo Jun 13, 2023
52e9edc
Added a print statement to assertOSError, changed assert functions to…
KnockbackNemo Jun 14, 2023
afd4a7f
Added a bit more to the Fault State tests, even though CAN communicat…
KnockbackNemo Jun 14, 2023
248bdae
Added Contactors_Init(), made CarSim loop sending messages for testin…
KnockbackNemo Jun 15, 2023
8ddb0d5
Addressing review comments: removed macro, volatilequalifier for exce…
KnockbackNemo Jun 15, 2023
3cc2d34
Some small things changed while testing
Cam0Cow Jun 17, 2023
7313f6d
Changed exception prio field to use an enum instead of an int.
KnockbackNemo Jun 17, 2023
3ab2665
Merge branch 'update_faultstate' of github.com:lhr-solar/Controls int…
KnockbackNemo Jun 20, 2023
b0f84de
Added/updated comments at the tops of the test files explaining what …
KnockbackNemo Jun 20, 2023
b4a8249
Moved tasks done by the bps-sim and motor-sim on Renode into the main…
KnockbackNemo Jun 22, 2023
cd55331
Test now runs on LoopBack mode. However, the weird print issue still …
KnockbackNemo Jun 22, 2023
9739c36
Updated comments and added a print statement to readTritium for motor…
KnockbackNemo Jun 22, 2023
015367b
Beginning work for new fault thread mechanism that spawns new tasks o…
KnockbackNemo Jun 24, 2023
308b9e9
Began new redesign of error handling in which everything is localized…
KnockbackNemo Jun 29, 2023
ce0b1f1
Actually, this commit is where names get changed to replace 'fault' w…
KnockbackNemo Jun 29, 2023
9eac2a3
Added a currError variable to hold the current error code for inspect…
KnockbackNemo Jun 29, 2023
a6b4271
Wrote assertTritiumError function for ReadTritium, created new nonrec…
KnockbackNemo Jun 29, 2023
554cf95
Renamed Display_Fault function to Display_Error.
KnockbackNemo Jun 29, 2023
3eb63bb
Added parameters and function to nonrecoverableErrorHnadler so that i…
KnockbackNemo Jun 29, 2023
4097b7e
Split nonrecoverableErrorHandler so that arrayMotorKill to turn off t…
KnockbackNemo Jun 29, 2023
43dae23
Finished a first compiling draft of the ReadCarCAN assert function.
KnockbackNemo Jun 29, 2023
636066d
Renamed the display error variable from currError to displayError.
KnockbackNemo Jun 29, 2023
f640691
Added assertTaskError function to serve as a single assertion functio…
KnockbackNemo Jul 2, 2023
57b5fca
Reordered and added new parameters to assertTaskError function.
KnockbackNemo Jul 3, 2023
dae8a12
Rewrote readTritium error assertion to use the main assertTaskError f…
KnockbackNemo Jul 3, 2023
33424fa
Typedef-ed the error assertion option enums to enforce usage, reorder…
KnockbackNemo Jul 3, 2023
48db19a
Began moving assertError function for display errors from display dri…
KnockbackNemo Jul 3, 2023
cdd7c8f
Moved error handling from Display.c to UpdateDisplay.c, decided to se…
KnockbackNemo Jul 4, 2023
a5bd69a
Modified test file, ReadTritium hall and nonhall sensor error tests a…
KnockbackNemo Jul 5, 2023
95a5e03
This is a commit where I tried to test assertDisplayError by using th…
KnockbackNemo Jul 5, 2023
c6663a1
Removed assertDisplayError from UpdateDisplay header file to make it …
KnockbackNemo Jul 5, 2023
85226cc
Actually the display error thing seems to work as intended. Nothing m…
KnockbackNemo Jul 5, 2023
8ac6226
Deleted faultstate things.
KnockbackNemo Jul 5, 2023
82a419c
Small documentation changes.
KnockbackNemo Jul 5, 2023
211b643
Reverted ReadCarCAN to where it was before fix_ignition_delay branche…
KnockbackNemo Jul 5, 2023
5c0f760
Renamed assertDisplayError to assertUpdateDisplayError to reduce chan…
KnockbackNemo Jul 5, 2023
0e6464b
Deleted the motorsim and carsim files for faultstate testing because …
KnockbackNemo Jul 8, 2023
dd0e140
Small documentation changes and file cleanup.
KnockbackNemo Jul 8, 2023
f62fa7b
Update faultstate testfile to work with new faultstate.
KnockbackNemo Jul 8, 2023
9f60cf0
Bringing improvements to the fault thread test from fix_ignition_dela…
KnockbackNemo Jul 11, 2023
0c833b8
Small changes made while updating error handling for ReadCarCAN on fi…
KnockbackNemo Jul 11, 2023
8880dc5
Renamed the scheduler lock option, changed error_code_t to a typedef.
KnockbackNemo Jul 13, 2023
bffcbb5
Update Apps/Src/ReadTritium.c
KnockbackNemo Jul 13, 2023
3574cd4
Update Apps/Src/ReadTritium.c
KnockbackNemo Jul 13, 2023
5dbc972
Changed _assertOSError to use the os_error_loc_t, attempted to realig…
KnockbackNemo Jul 13, 2023
6bd4bdc
Merge branch 'update_faultstate' of github.com:lhr-solar/Controls int…
KnockbackNemo Jul 13, 2023
17900d4
Update Apps/Src/ReadTritium.c
KnockbackNemo Jul 13, 2023
2ca1f4e
Reattempting to align the UpdateDisplay.h error enum.
KnockbackNemo Jul 13, 2023
639e1e0
Aligned(?) the comments from UpdateDisplay.h. I think it should all l…
KnockbackNemo Jul 13, 2023
1b5a23e
Changed assertTaskError to take an error_code_t, and changed error_co…
KnockbackNemo Jul 14, 2023
e93af92
Modified ReadCarCAN so it compiles
Cam0Cow Jul 20, 2023
907f68d
Merge branch 'master' into update_faultstate
Cam0Cow Jul 20, 2023
5b55b39
Addressed PR review comments. Mostly small changes and one doc altera…
KnockbackNemo Jul 29, 2023
26596e2
Additional PR review changes (renaming things)
KnockbackNemo Jul 29, 2023
d38f440
Apply suggestions from code review
KnockbackNemo Jul 29, 2023
a0015d6
Addressed review comment: assertUpdateDisplayError takes in an Update…
KnockbackNemo Jul 29, 2023
459dc26
Merge branch 'update_faultstate' of github.com:lhr-solar/Controls int…
KnockbackNemo Jul 29, 2023
3a27d91
Fixed assertUpdateDisplayError using the wrong error type.
KnockbackNemo Jul 29, 2023
ff16226
Additional review edits: Changed error_code_t from an int16_t to a ui…
KnockbackNemo Aug 4, 2023
77b7a55
Updated Test_DisplayApps to compile with new fault handling system.
KnockbackNemo Aug 7, 2023
0c1f379
Addressed review and other comments: added prints to error infinite l…
KnockbackNemo Aug 11, 2023
4955c26
Deleted #define NUM_TRITIUM_ERRORS and MotorController_getTritiumErro…
KnockbackNemo Aug 26, 2023
52a9a46
Added a comment about always locking the scheduler on nonrecoverable …
KnockbackNemo Aug 26, 2023
d40b99e
Added additional comments to the test file.
KnockbackNemo Sep 17, 2023
0ece51a
Removed redundant calls to assertUpdateDisplayError. The only ones le…
KnockbackNemo Sep 23, 2023
621fcc9
Changed fault handling for UpdateDisplay to clear the queue and reset…
KnockbackNemo Sep 23, 2023
7a03bb2
Made print statements and comments a bit clearer/cleaner.
KnockbackNemo Sep 23, 2023
5420d04
Display fault is now 4 hex digits
Cam0Cow Sep 30, 2023
6effcc8
Fixes during hardware testing to a) stop the display error from being…
KnockbackNemo Oct 1, 2023
64f287e
Merge branch 'update_faultstate' of github.com:lhr-solar/Controls int…
KnockbackNemo Oct 1, 2023
c64c803
Removed unnecessary value assignments from the UpdateDisplay error enum.
KnockbackNemo Oct 6, 2023
a87b2d4
Apply suggestions from code review
KnockbackNemo Oct 6, 2023
af25734
Changed Display fault enum from positive to default values, added a d…
KnockbackNemo Oct 7, 2023
051c9d8
Merge branch 'master' into update_faultstate
Cam0Cow Oct 7, 2023
6d674da
Name change
Cam0Cow Oct 7, 2023
128777d
Addressed review comments- changed assertTaskError to throwTaskError,…
KnockbackNemo Oct 14, 2023
ea59cb6
Renamed assertTaskError to throwTaskError in the test file.
KnockbackNemo Oct 14, 2023
441745a
Changed a print statement so that it still makes sense when sending a…
KnockbackNemo Oct 14, 2023
27e8725
Removed MOTOR_STOPPED macro.
KnockbackNemo Oct 21, 2023
657cf3b
Removed the ERR_NO_CHANGE in UpdateDisplay and all checks for if thin…
KnockbackNemo Oct 21, 2023
4a85a34
Merge branch 'master' into update_faultstate
Cam0Cow Oct 21, 2023
a6817ec
Update Tests/Test_FaultThread_Exceptions.c
KnockbackNemo Oct 21, 2023
a51a0e0
Moved ReadCarCAN Display_Evac into a callback for the BPSTrip message…
KnockbackNemo Oct 21, 2023
9d86a84
Merge branch 'update_faultstate' of github.com:lhr-solar/Controls int…
KnockbackNemo Oct 21, 2023
2b983c8
Fixed Doxygen comments.
KnockbackNemo Oct 21, 2023
eb1bf91
Removed references to OS_LOC in new faultstate code.
KnockbackNemo Oct 23, 2023
0591511
Merge branch 'master' into update_faultstate
KnockbackNemo Oct 23, 2023
084a687
Removed one more reference to OS LOC.
KnockbackNemo Oct 23, 2023
fc5e6b2
Replaced accidentally-deleted Doxygen comment.
KnockbackNemo Oct 24, 2023
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
19 changes: 0 additions & 19 deletions Apps/Inc/FaultState.h

This file was deleted.

12 changes: 1 addition & 11 deletions Apps/Inc/ReadTritium.h
KnockbackNemo marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/**
* @copyright Copyright (c) 2018-2023 UT Longhorn Racing Solar
/* Copyright (c) 2021 UT Longhorn Racing Solar
* @file ReadTritium.h
* @brief
*
Expand All @@ -15,8 +14,6 @@
#include "common.h"
#include "Tasks.h"

#define CAR_STOPPED 0

/**
* Motor Error States
* Read messages from motor in ReadTritium and trigger appropriate error messages as needed based on bits
Expand All @@ -35,16 +32,9 @@ typedef enum{
T_INIT_FAIL = (1<<9), //motor controller fails to restart or initialize
T_NONE = 0x00,
} tritium_error_code_t;
#define NUM_TRITIUM_ERRORS 9 //9 errors, and 1 entry for no error

/**
* @brief Returns the current error status of the tritium controller
*/
tritium_error_code_t MotorController_getTritiumError(void);

float Motor_RPM_Get();
float Motor_Velocity_Get();
void MotorController_Restart();

#endif

Expand Down
78 changes: 43 additions & 35 deletions Apps/Inc/Tasks.h
KnockbackNemo marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@

/**
* Priority Definitions
*/
#define TASK_FAULT_STATE_PRIO 1
*/
#define TASK_INIT_PRIO 2
KnockbackNemo marked this conversation as resolved.
Show resolved Hide resolved
#define TASK_READ_TRITIUM_PRIO 3
#define TASK_SEND_TRITIUM_PRIO 4
KnockbackNemo marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -44,7 +43,6 @@
#define DEFAULT_STACK_SIZE 256
#define WATERMARK_STACK_LIMIT DEFAULT_STACK_SIZE/2

#define TASK_FAULT_STATE_STACK_SIZE DEFAULT_STACK_SIZE
#define TASK_INIT_STACK_SIZE DEFAULT_STACK_SIZE
#define TASK_SEND_TRITIUM_STACK_SIZE DEFAULT_STACK_SIZE
#define TASK_READ_CAR_CAN_STACK_SIZE DEFAULT_STACK_SIZE
Expand All @@ -55,12 +53,14 @@
#define TASK_DEBUG_DUMP_STACK_SIZE DEFAULT_STACK_SIZE
#define TASK_COMMAND_LINE_STACK_SIZE DEFAULT_STACK_SIZE

/**
* Task error variable type
*/
typedef uint16_t error_code_t;

/**
* Task Prototypes
*/
void Task_FaultState(void* p_arg);

void Task_Init(void* p_arg);

void Task_SendTritium(void* p_arg);
Expand All @@ -79,10 +79,11 @@ void Task_DebugDump(void *p_arg);

void Task_CommandLine(void* p_arg);



/**
* TCBs
*/
extern OS_TCB FaultState_TCB;
extern OS_TCB Init_TCB;
extern OS_TCB SendTritium_TCB;
extern OS_TCB ReadCarCAN_TCB;
Expand All @@ -97,7 +98,6 @@ extern OS_TCB CommandLine_TCB;
/**
* Stacks
*/
extern CPU_STK FaultState_Stk[TASK_FAULT_STATE_STACK_SIZE];
extern CPU_STK Init_Stk[TASK_INIT_STACK_SIZE];
extern CPU_STK SendTritium_Stk[TASK_SEND_TRITIUM_STACK_SIZE];
extern CPU_STK ReadCarCAN_Stk[TASK_READ_CAR_CAN_STACK_SIZE];
Expand All @@ -113,37 +113,12 @@ extern CPU_STK CommandLine_Stk[TASK_COMMAND_LINE_STACK_SIZE];
*/
extern OS_Q CANBus_MsgQ;

/**
* Semaphores
*/
extern OS_SEM FaultState_Sem4;

/**
* @brief Initialize the task switch hook
* Registers the hook with the RTOS
*/
void TaskSwHook_Init(void);


/**
* Global Variables
*/

/**
* Fault Enum
*
* Different fault states that need to be handled by the FaultState task
*/
typedef enum{
FAULT_NONE = 0x00, // No fault
FAULT_OS = 0x01, // for OS faults
FAULT_UNREACH = 0x02, // for unreachable conditions
FAULT_TRITIUM = 0x04, // for errors sent from the tritium
FAULT_READBPS = 0x08, // for unsuccessfully reading from BPS CAN
FAULT_DISPLAY = 0x10, // for display faults
FAULT_BPS = 0x20, // for if BPS trips
} fault_bitmap_t;

/**
* Task trace
*
Expand All @@ -160,10 +135,43 @@ typedef struct {

extern task_trace_t PrevTasks;

// Store error codes that are set in task error assertion functions
extern error_code_t Error_ReadTritium;
extern error_code_t Error_ReadCarCAN;
extern error_code_t Error_UpdateDisplay;
KnockbackNemo marked this conversation as resolved.
Show resolved Hide resolved

/**
* Error variables
*/
extern fault_bitmap_t FaultBitmap;
* Error-handling option enums
*/

// Scheduler lock parameter option for asserting a task error
typedef enum {
OPT_NO_LOCK_SCHED,
OPT_LOCK_SCHED
} error_scheduler_lock_opt_t;

// Recoverable/nonrecoverable parameter option for asserting a task error
typedef enum {
OPT_RECOV,
OPT_NONRECOV
} error_recov_opt_t;

/**
* @brief For use in error handling: opens array and motor precharge bypass contactor
* and turns on additional brakelight to signal that a critical error happened.
*/
void EmergencyContactorOpen();

/**
* @brief Assert a task error by setting the location variable and optionally locking the scheduler,
* displaying a fault screen (if nonrecoverable), jumping to a callback function, and entering an infinite loop.
* Called by task-specific error-assertion functions that are also responsible for setting the error variable.
* @param errorCode the enum for the specific error that happened
* @param errorCallback a callback function to a handler for that specific error,
* @param lockSched whether or not to lock the scheduler to ensure the error is handled immediately
* @param nonrecoverable whether or not to kill the motor, display the fault screen, and enter an infinite while loop
*/
void throwTaskError(error_code_t errorCode, callback_t errorCallback, error_scheduler_lock_opt_t lockSched, error_recov_opt_t nonrecoverable);

/**
* @brief Assert Error if OS function call fails
Expand Down
18 changes: 12 additions & 6 deletions Apps/Inc/UpdateDisplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
* Error types
*/
typedef enum{
UPDATEDISPLAY_ERR_NONE = 0,
UPDATEDISPLAY_ERR_FIFO_PUT =-1, // Error putting command in fifo
UPDATEDISPLAY_ERR_FIFO_POP =-2, // Error popping command from fifo
UPDATEDISPLAY_ERR_PARSE_COMP =-3, // Error parsing component/val in SetComponent
UPDATEDISPLAY_ERR_NO_CHANGE =-4, // No change in component value
UPDATEDISPLAY_ERR_NONE,
UPDATEDISPLAY_ERR_FIFO_PUT, // Error putting command in fifo
UPDATEDISPLAY_ERR_FIFO_POP, // Error popping command from fifo
UPDATEDISPLAY_ERR_PARSE_COMP, // Error parsing component/val in SetComponent
UPDATEDISPLAY_ERR_DRIVER // Driver call returned an error
} UpdateDisplayError_t;
KnockbackNemo marked this conversation as resolved.
Show resolved Hide resolved

/**
Expand Down Expand Up @@ -130,6 +130,12 @@ UpdateDisplayError_t UpdateDisplay_SetRegenState(TriState_t state);
*/
UpdateDisplayError_t UpdateDisplay_SetCruiseState(TriState_t state);

#endif
/**
* @brief Clears the display message queue and sets the message counter semaphore value to 0
* @param none
* @returns none
*/
void UpdateDisplay_ClearQueue(void);

#endif
/* @} */
KnockbackNemo marked this conversation as resolved.
Show resolved Hide resolved
22 changes: 0 additions & 22 deletions Apps/Src/DebugDump.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include "Tasks.h"
#include "SendTritium.h"

// global variables
extern fault_bitmap_t FaultBitmap;

static const char *MINIONPIN_STRING[] = {
FOREACH_PIN(GENERATE_STRING)
Expand All @@ -30,15 +28,6 @@ static const char *GEAR_STRING[] = {
/*----------------------------------------------*/
#define FAULT_BITMAP_NUM 6

static const char *FAULT_BITMAP_STRING[] = {
"FAULT_NONE",
"FAULT_OS",
"FAULT_UNREACH",
"FAULT_TRITIUM",
"FAULT_READBPS",
"FAULT_DISPLAY",
"FAULT_BPS"
};
/*----------------------------------------------*/

void Task_DebugDump(void* p_arg) {
Expand Down Expand Up @@ -76,17 +65,6 @@ void Task_DebugDump(void* p_arg) {
printf("Current Gear: %s\n\r", GEAR_STRING[get_gear()]);
print_float("Current Setpoint: ", get_currentSetpoint());

// fault bitmap
printf("Fault Bitmap: ");
if(FaultBitmap == FAULT_NONE){
printf("%s", FAULT_BITMAP_STRING[0]);
}else{
for(int i = 0; i < FAULT_BITMAP_NUM; i++){
if(FaultBitmap & (1 << i)){
printf("%s ", FAULT_BITMAP_STRING[i]);
}
}
}
printf("\n\r");

// Delay of 5 seconds
Expand Down
Loading
Loading