Skip to content

Commit

Permalink
Comments and log cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesus Lopez Garcia committed Sep 21, 2023
1 parent fee52be commit aacd60a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
6 changes: 0 additions & 6 deletions jni/msp_displayport_mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ static void copy_to_msp_frame_buffer(void *buffer, uint16_t size) {

static void rx_msp_callback(msp_msg_t *msp_message)
{
printf("Callback...\n");
// Process a received MSP message from FC and decide whether to send it to the PTY (DJI) or UDP port (MSP-OSD on Goggles)
DEBUG_PRINT("FC->AU MSP msg %d with data len %d \n", msp_message->cmd, msp_message->size);
switch(msp_message->cmd) {
Expand Down Expand Up @@ -236,7 +235,6 @@ static void rx_msp_callback(msp_msg_t *msp_message)
}
}

//INFO: This method is to send the request to the FC if cache is missed.
static void tx_msp_callback(msp_msg_t *msp_message)
{
// We got a valid message from DJI asking for something. See if there's a response in the cache or not.
Expand All @@ -256,12 +254,10 @@ static void tx_msp_callback(msp_msg_t *msp_message)
// cache miss, so write the DJI request to serial and wait for the FC to come back.
DEBUG_PRINT("DJI->FC MSP CACHE MISS msg %d\n",msp_message->cmd);
uint16_t size = msp_data_from_msg(message_buffer, msp_message);
//INFO: Write the message to the serial_fd
write(serial_fd, message_buffer, size);
}
}

//INFO: This is sending the pakcage to the goggles
static void send_data_packet(int data_socket_fd, dji_shm_state_t *dji_shm) {
packet_data_t data;
memset(&data, 0, sizeof(data));
Expand All @@ -271,7 +267,6 @@ static void send_data_packet(int data_socket_fd, dji_shm_state_t *dji_shm) {
data.fc_vtx_channel = fc_vtx_channel;
memcpy(data.fc_variant, current_fc_identifier, sizeof(current_fc_identifier));
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);
//INFO: Write the message to the socket
write(data_socket_fd, &data, sizeof(data));
}

Expand Down Expand Up @@ -310,7 +305,6 @@ static void send_compressed_screen(int compressed_fd) {
}

int main(int argc, char *argv[]) {
printf("Starting...\n");
memset(current_fc_identifier, 0, sizeof(current_fc_identifier));
memset(msp_character_map_buffer, 0, sizeof(msp_character_map_buffer));
memset(msp_character_map_draw, 0, sizeof(msp_character_map_draw));
Expand Down
1 change: 0 additions & 1 deletion jni/osd_dji_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ static void msp_draw_complete() {

static void msp_callback(msp_msg_t *msp_message)
{
//INFO: Filter out message?
displayport_process_message(display_driver, msp_message);
}

Expand Down

0 comments on commit aacd60a

Please sign in to comment.