diff --git a/CM4/RemoteProc/WildhornAV_CM4.elf.bz2 b/CM4/RemoteProc/WildhornAV_CM4.elf.bz2 index 033ad761..1c5a2f69 100755 Binary files a/CM4/RemoteProc/WildhornAV_CM4.elf.bz2 and b/CM4/RemoteProc/WildhornAV_CM4.elf.bz2 differ diff --git a/CM4/ert/driver/can.c b/CM4/ert/driver/can.c index 199c8d60..9b46f5c7 100755 --- a/CM4/ert/driver/can.c +++ b/CM4/ert/driver/can.c @@ -19,6 +19,7 @@ #include #include #include +#include /********************** * CONSTANTS @@ -144,7 +145,9 @@ util_error_t can_handle_data(device_interface_t * can_if) { frame.data_id = rxHeader.Identifier >> CAN_DATAID_OFFSET; uint8_t source = rxHeader.Identifier & CAN_BOARDID_MASK; - od_handle_can_frame(source, &frame); + debug_log("CAN Received: %x\n", source); + + //od_handle_can_frame(source, &frame); } return ER_SUCCESS; @@ -270,13 +273,17 @@ void can_transmit_thread(__attribute__((unused)) void *arg) { while(1) { // retrieve next frame od_frame_t frame; - od_pop_from_out_q(&frame); - od_push_to_in_q(&frame); + + frame.data[0] = 35; + //od_pop_from_out_q(&frame); + //od_push_to_in_q(&frame); led_checkpoint(checkpoint_tx); // send over CAN device_interface_send(&fdcan1_interface, (uint8_t *) &frame, sizeof(od_frame_t)); + + osDelay(1000); } } diff --git a/CM4/ert/init.c b/CM4/ert/init.c index 6991103b..a1c7beb3 100755 --- a/CM4/ert/init.c +++ b/CM4/ert/init.c @@ -123,7 +123,7 @@ void init(void) { od_init(); // NOT USED DUE TO BUGS!!!! - //can_init(WH_COMPUTER); + can_init(1); #if WH_HAS_FEEDBACK == WH_TRUE #if WH_USE_BUZZER == WH_TRUE @@ -155,9 +155,9 @@ void init(void) { INIT_THREAD_CREATE(hostcom_handle, hostcom, hostcom_thread, NULL, HOSTCOM_SZ, HOSTCOM_PRIO); // NOT USED DUE TO BUGS!!!! - //INIT_THREAD_CREATE(can_rx_handle, can_rx, can_receive_thread, NULL, CAN_TX_SZ, CAN_TX_PRIO); + INIT_THREAD_CREATE(can_rx_handle, can_rx, can_receive_thread, NULL, CAN_TX_SZ, CAN_TX_PRIO); UNUSED(can_rx_handle); - //INIT_THREAD_CREATE(can_tx_handle, can_tx, can_transmit_thread, NULL, CAN_RX_SZ, CAN_RX_PRIO); + INIT_THREAD_CREATE(can_tx_handle, can_tx, can_transmit_thread, NULL, CAN_RX_SZ, CAN_RX_PRIO); UNUSED(can_tx_handle); #if WH_HAS_RADIO