C++ Library for the PsiSwarm Robot - Version 0.8
Dependents: PsiSwarm_V8_Blank_CPP Autonomia_RndmWlk
Fork of PsiSwarmV7_CPP by
Diff: eprom.cpp
- Revision:
- 4:1c621cb8cf0d
- Parent:
- 2:c6986ee3c7c5
- Child:
- 5:3cdd1a37cdd7
--- a/eprom.cpp Tue Mar 15 00:58:09 2016 +0000 +++ b/eprom.cpp Wed Aug 03 12:25:23 2016 +0000 @@ -5,9 +5,9 @@ * (C) Dept. Electronics & Computer Science, University of York * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis * - * PsiSwarm Library Version: 0.41 + * PsiSwarm Library Version: 0.5 * - * March 2016 + * April 2016 * * Functions for accessing the 64Kb EPROM chip and reading the reserved firmware block * @@ -105,6 +105,19 @@ has_temperature_sensor= firmware_bytes[19]; has_recharging_circuit= firmware_bytes[20]; has_433_radio= firmware_bytes[21]; + if(firmware_version > 1.0){ + motor_calibration_set = firmware_bytes[22]; + if(motor_calibration_set == 1){ + left_motor_calibration_value = (float) firmware_bytes[23] * 65536; + left_motor_calibration_value += ((float) firmware_bytes[24] * 256); + left_motor_calibration_value += firmware_bytes[25]; + left_motor_calibration_value /= 16777216; + right_motor_calibration_value = (float) firmware_bytes[26] * 65536; + right_motor_calibration_value += ((float) firmware_bytes[27] * 256); + right_motor_calibration_value += firmware_bytes[28]; + right_motor_calibration_value /= 16777216; + } + } else motor_calibration_set = 0; return 1; } return 0;