Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: CAN/function_CAN.cpp
- Revision:
- 169:645207e160ca
- Parent:
- 162:9dd4f35e9de8
- Child:
- 170:42c938a40313
--- a/CAN/function_CAN.cpp Fri Oct 16 00:25:32 2020 +0000
+++ b/CAN/function_CAN.cpp Mon Nov 16 02:23:23 2020 +0000
@@ -708,6 +708,23 @@
CONTROL_UTILITY_MODE = 1;
break;
}
+ case CRX_SET_FREQ_TEST: {
+ cnt_freq_test = 0;
+ CONTROL_UTILITY_MODE = 34;
+ break;
+ }
+
+ case CRX_ASK_BUFFER: {
+ cnt_buffer = (int16_t) (msg.data[1] | msg.data[2] << 8);
+ CAN_TX_BUFFER(cnt_buffer);
+ break;
+ }
+
+ case CRX_SET_STEP_TEST: {
+ cnt_step_test = 0;
+ CONTROL_UTILITY_MODE = 37;
+ break;
+ }
default:
break;
@@ -1379,6 +1396,25 @@
can.write(temp_msg);
}
+
+void CAN_TX_BUFFER(int16_t t_cnt_buffer) {
+ CANMessage temp_msg;
+ int16_t send_pos_array, send_ref_array;
+ send_pos_array = (int16_t) (pos_array[t_cnt_buffer]);
+ send_ref_array = (int16_t) (ref_array[t_cnt_buffer]);
+
+ temp_msg.id = CID_TX_INFO;
+ temp_msg.len = 5;
+ temp_msg.data[0] = (uint8_t) CTX_SEND_BUFFER;
+ temp_msg.data[1] = (uint8_t) send_pos_array;
+ temp_msg.data[2] = (uint8_t) (send_pos_array >> 8);
+ temp_msg.data[3] = (uint8_t) (send_ref_array);
+ temp_msg.data[4] = (uint8_t) ((send_ref_array) >> 8);
+
+ can.write(temp_msg);
+}
+
+
/******************************************************************************
Sensor & State Transmission Functions
*******************************************************************************/