Skip to content

Commit 07ea1c3

Browse files
remove calypso control
1 parent f03ce5d commit 07ea1c3

2 files changed

Lines changed: 9 additions & 29 deletions

File tree

Core/Src/u_can.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -217,25 +217,6 @@ void can_inbox(can_msg_t *message) {
217217
receive_spare_efuse_state(message, &spare);
218218
efuse_update_state(EFUSE_SPARE, (efuse_control_state_t)spare.state);
219219
break;
220-
case CANID_CALYPSO_RTDS_STATE:
221-
/* 0 = Sound RTDS. 1 = Cancel RTDS. 2 = Start Reverse, 3 = Stop Reverse */
222-
enum {
223-
SOUND_RTDS = 0,
224-
CANCEL_RTDS = 1,
225-
START_REVERSE = 2,
226-
STOP_REVERSE = 3
227-
};
228-
229-
rtds_command_message_t commands = { 0 };
230-
receive_rtds_command_message(message, &commands);
231-
switch(commands.command) {
232-
case SOUND_RTDS: rtds_soundRTDS(); break;
233-
case CANCEL_RTDS: rtds_cancelRTDS(); break;
234-
case START_REVERSE: rtds_startReverseSound(); break;
235-
case STOP_REVERSE: rtds_stopReverseSound(); break;
236-
default: break;
237-
}
238-
break;
239220
case CANID_WHEEL_BUTTONS:
240221
wheel_buttons_t wheel_buttons = { 0 };
241222
receive_wheel_buttons(message, &wheel_buttons);

Core/Src/u_threads.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#define PRIO_vShutdown 2
4242
#define PRIO_vEFuses 3
4343
#define PRIO_vMux 3
44-
#define PRIO_vTelemetry 3
44+
#define PRIO_vRTDS 3
4545
#define PRIO_vTest 3
4646
#define PRIO_vPeripherals 3
4747

@@ -877,19 +877,21 @@ void vPeripherals(ULONG thread_input) {
877877
}
878878
}
879879

880+
881+
880882
/* Misc. Telemetry Thread.
881883
This thread periodically reports the RTDS and statemachine state data. The actual states of these things are managed by the statemachine thread. This is specifically for telemetry. */
882-
static thread_t misc_telemetry_thread = {
883-
.name = "Misc Telemetry Thread", /* Name */
884+
static thread_t rtds_thread = {
885+
.name = "RTDS Thread", /* Name */
884886
.size = 2048, /* Stack Size (in bytes) */
885-
.priority = PRIO_vTelemetry, /* Priority */
887+
.priority = PRIO_vRTDS, /* Priority */
886888
.threshold = 0, /* Preemption Threshold */
887889
.time_slice = TX_NO_TIME_SLICE, /* Time Slice */
888890
.auto_start = TX_AUTO_START, /* Auto Start */
889891
.sleep = 100, /* Sleep (in ticks) */
890-
.function = vTelemetry /* Thread Function */
892+
.function = vRTDS /* Thread Function */
891893
};
892-
void vTelemetry(ULONG thread_input) {
894+
void vRTDS(ULONG thread_input) {
893895

894896
while(1) {
895897

@@ -911,11 +913,8 @@ void vTelemetry(ULONG thread_input) {
911913

912914
send_rtds_state_message(rtds_pin_state, rtds_sounding_state, rtds_reverse_state, error_state);
913915

914-
/* Send Carstate message. */
915-
send_carstate_msg();
916-
917916
/* Sleep Thread for specified number of ticks. */
918-
tx_thread_sleep(misc_telemetry_thread.sleep);
917+
tx_thread_sleep(rtds_thread.sleep);
919918
}
920919
}
921920

0 commit comments

Comments
 (0)