@@ -158,7 +158,6 @@ static void copy_to_msp_frame_buffer(void *buffer, uint16_t size) {
158
158
159
159
static void rx_msp_callback (msp_msg_t * msp_message )
160
160
{
161
- printf ("Callback...\n" );
162
161
// Process a received MSP message from FC and decide whether to send it to the PTY (DJI) or UDP port (MSP-OSD on Goggles)
163
162
DEBUG_PRINT ("FC->AU MSP msg %d with data len %d \n" , msp_message -> cmd , msp_message -> size );
164
163
switch (msp_message -> cmd ) {
@@ -236,7 +235,6 @@ static void rx_msp_callback(msp_msg_t *msp_message)
236
235
}
237
236
}
238
237
239
- //INFO: This method is to send the request to the FC if cache is missed.
240
238
static void tx_msp_callback (msp_msg_t * msp_message )
241
239
{
242
240
// 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)
256
254
// cache miss, so write the DJI request to serial and wait for the FC to come back.
257
255
DEBUG_PRINT ("DJI->FC MSP CACHE MISS msg %d\n" ,msp_message -> cmd );
258
256
uint16_t size = msp_data_from_msg (message_buffer , msp_message );
259
- //INFO: Write the message to the serial_fd
260
257
write (serial_fd , message_buffer , size );
261
258
}
262
259
}
263
260
264
- //INFO: This is sending the pakcage to the goggles
265
261
static void send_data_packet (int data_socket_fd , dji_shm_state_t * dji_shm ) {
266
262
packet_data_t data ;
267
263
memset (& data , 0 , sizeof (data ));
@@ -271,7 +267,6 @@ static void send_data_packet(int data_socket_fd, dji_shm_state_t *dji_shm) {
271
267
data .fc_vtx_channel = fc_vtx_channel ;
272
268
memcpy (data .fc_variant , current_fc_identifier , sizeof (current_fc_identifier ));
273
269
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
275
270
write (data_socket_fd , & data , sizeof (data ));
276
271
}
277
272
@@ -310,7 +305,6 @@ static void send_compressed_screen(int compressed_fd) {
310
305
}
311
306
312
307
int main (int argc , char * argv []) {
313
- printf ("Starting...\n" );
314
308
memset (current_fc_identifier , 0 , sizeof (current_fc_identifier ));
315
309
memset (msp_character_map_buffer , 0 , sizeof (msp_character_map_buffer ));
316
310
memset (msp_character_map_draw , 0 , sizeof (msp_character_map_draw ));
0 commit comments