Skip to content

Commit

Permalink
No SD card return (#196)
Browse files Browse the repository at this point in the history
* Returning MAV_RESULT_DENIED if there is no SD-card in the robot when we start the logging

* Removed delay_ms used for debugging
  • Loading branch information
ndousse authored and jlecoeur committed Apr 8, 2016
1 parent a881e91 commit 76d6b9b
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions hal/avr32/fat_fs_mounting_telemetry.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,29 @@ static mav_result_t fat_fs_mounting_telemetry_toggle_logging(fat_fs_mounting_t*
if(packet->param1 == 1)
{
print_util_dbg_print("Start logging from command message\r\n");

fat_fs_mounting_mount(fat_fs_mounting,true);

if (fat_fs_mounting->sys_mounted)
{
result = MAV_RESULT_ACCEPTED;

print_util_dbg_print("Mounting successful\r\n");
}
else
{
result = MAV_RESULT_DENIED;
print_util_dbg_print("Mounting failed\r\n");
}
}
else
{
print_util_dbg_print("Stop logging from command message\r\n");
fat_fs_mounting->loop_count = 0;

result = MAV_RESULT_ACCEPTED;
}

result = MAV_RESULT_ACCEPTED;


fat_fs_mounting->log_data = packet->param1;
}
Expand Down

0 comments on commit 76d6b9b

Please sign in to comment.