some print formatting cleanup
This commit is contained in:
parent
d5777031e4
commit
4b0959ecaa
|
@ -40,8 +40,8 @@ static constexpr uint32_t VALID_MARKER_DEFAULT = 0xcafecall;
|
|||
union NonVolatileMemory {
|
||||
/// place hard-coded start marker at the beginning of the data
|
||||
/// to indicate validity
|
||||
uint32_t validMarker = VALID_MARKER_DEFAULT;
|
||||
struct Calibration {
|
||||
uint32_t validMarker = VALID_MARKER_DEFAULT;
|
||||
JoystickCalibration joystickCal;
|
||||
LinearAnalogCalibration linearCal;
|
||||
} __attribute__((packed)) calData;
|
||||
|
|
|
@ -19,8 +19,8 @@ bool runJoystickCalibrationRoutine(AlignedJoy& joy, JoystickCalibration& cal) {
|
|||
*/
|
||||
// CALIBRATION 1
|
||||
Serial.print(
|
||||
"Center Joystick Calibration \n\nLeave the joystick in the centre position during the "
|
||||
"calibration\ntime which is set to ");
|
||||
" Center calibration \n\n Leave the joystick in the centre position during "
|
||||
"the calibration\n time which is set to ");
|
||||
Serial.print(TIME_CAL_1);
|
||||
Serial.println(" milliseconds.");
|
||||
delay(5000);
|
||||
|
@ -42,7 +42,7 @@ bool runJoystickCalibrationRoutine(AlignedJoy& joy, JoystickCalibration& cal) {
|
|||
* the calibration time.
|
||||
*/
|
||||
Serial.print(
|
||||
"Start axes Calibration \n\nRotate the joystick in a circular way along its "
|
||||
" Start axes calibration \n\n Rotate the joystick in a circular way along its "
|
||||
"circumference\n throughout the calibration time (");
|
||||
Serial.print(TIME_CAL_2);
|
||||
Serial.println(" milliseconds).");
|
||||
|
@ -114,6 +114,7 @@ void setup() {
|
|||
calibrationInvalid |=
|
||||
!nvm.calData.joystickCal.x.valid() || !nvm.calData.joystickCal.y.valid();
|
||||
if (calibrationInvalid) {
|
||||
Serial.println("Joystick1 calibration required\n========================");
|
||||
calibrationInvalid |=
|
||||
!runJoystickCalibrationRoutine(joystick_1, nvm.calData.joystickCal);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue