@@ -158,7 +158,6 @@ static void copy_to_msp_frame_buffer(void *buffer, uint16_t size) {
158158
159159static void rx_msp_callback (msp_msg_t * msp_message )
160160{
161- printf ("Callback...\n" );
162161 // Process a received MSP message from FC and decide whether to send it to the PTY (DJI) or UDP port (MSP-OSD on Goggles)
163162 DEBUG_PRINT ("FC->AU MSP msg %d with data len %d \n" , msp_message -> cmd , msp_message -> size );
164163 switch (msp_message -> cmd ) {
@@ -221,7 +220,7 @@ static void rx_msp_callback(msp_msg_t *msp_message)
221220 case MSP_CMD_VTX_CONFIG : {
222221 printf ("Received VTX CONFIG message...\n" );
223222 printf ("data: %d %d %d \n" , msp_message -> payload [0 ], msp_message -> payload [1 ], msp_message -> payload [2 ]);
224- //TODO: Damage control accessing to index 2 if not exists
223+ // TODO: Damage control accessing to index 2 if not exists
225224 fc_vtx_channel = msp_message -> payload [2 ];
226225 }
227226 default : {
@@ -236,7 +235,6 @@ static void rx_msp_callback(msp_msg_t *msp_message)
236235 }
237236}
238237
239- //INFO: This method is to send the request to the FC if cache is missed.
240238static void tx_msp_callback (msp_msg_t * msp_message )
241239{
242240 // We got a valid message from DJI asking for something. See if there's a response in the cache or not.
@@ -256,12 +254,10 @@ static void tx_msp_callback(msp_msg_t *msp_message)
256254 // cache miss, so write the DJI request to serial and wait for the FC to come back.
257255 DEBUG_PRINT ("DJI->FC MSP CACHE MISS msg %d\n" ,msp_message -> cmd );
258256 uint16_t size = msp_data_from_msg (message_buffer , msp_message );
259- //INFO: Write the message to the serial_fd
260257 write (serial_fd , message_buffer , size );
261258 }
262259}
263260
264- //INFO: This is sending the pakcage to the goggles
265261static void send_data_packet (int data_socket_fd , dji_shm_state_t * dji_shm ) {
266262 packet_data_t data ;
267263 memset (& data , 0 , sizeof (data ));
@@ -271,7 +267,6 @@ static void send_data_packet(int data_socket_fd, dji_shm_state_t *dji_shm) {
271267 data .fc_vtx_channel = fc_vtx_channel ;
272268 memcpy (data .fc_variant , current_fc_identifier , sizeof (current_fc_identifier ));
273269 DEBUG_PRINT ("got voltage %f V temp %d C variant %.4s and channel %d\n" , (float )(data .tx_voltage / 64.0f ), data .tx_temperature , data .fc_variant , data .fc_vtx_channel );
274- //INFO: Write the message to the socket
275270 write (data_socket_fd , & data , sizeof (data ));
276271}
277272
@@ -310,7 +305,6 @@ static void send_compressed_screen(int compressed_fd) {
310305}
311306
312307int main (int argc , char * argv []) {
313- printf ("Starting...\n" );
314308 memset (current_fc_identifier , 0 , sizeof (current_fc_identifier ));
315309 memset (msp_character_map_buffer , 0 , sizeof (msp_character_map_buffer ));
316310 memset (msp_character_map_draw , 0 , sizeof (msp_character_map_draw ));
0 commit comments