Fixed some wrong comments.

This commit is contained in:
2019-01-20 00:44:34 +00:00
parent 2350a74f06
commit d20d852d92

View File

@@ -126,11 +126,11 @@ ISR(TIMER1_COMPA_vect)
if (!rUP) // If button UP pressed
{
if (menuState == 1){} // Do nothing and leave menuState
// as it is (4)
// as it is (1)
else {
menuState--;
}
while (!rUP); // Check if button is still pressed do nothing
while (!rUP); // Check if button is still pressed, do nothing
}
@@ -141,7 +141,7 @@ ISR(TIMER1_COMPA_vect)
else {
menuState++;
}
while (!rDOWN); // Check if button is still pressed do nothing
while (!rDOWN); // Check if button is still pressed, do nothing
}
@@ -149,31 +149,31 @@ ISR(TIMER1_COMPA_vect)
{
if (menuState == 1) // and the menuState is 1
{
prevMenu = menuState; // and set prevMenu to 1
prevMenu = menuState; // set prevMenu to 1
menuState = 10; // then reset menuState to 10
}
else if (menuState == 2) // If menuState is 2
{
prevMenu = menuState; // and set prevMenu to 2
prevMenu = menuState; // set prevMenu to 2
menuState = 11; // then reset menuState to 11
}
else if (menuState == 3) // If menuState is 3
{
prevMenu = menuState; // and set prevMenu to 3
prevMenu = menuState; // set prevMenu to 3
menuState = 12; // then reset menuState to 12
}
else if (menuState == 4) // If menuState is 4
{
prevMenu = menuState; // and set prevMenu to 4
prevMenu = menuState; // set prevMenu to 4
menuState = 13; // then reset menuState to 13
}
while (!rOK); // Check if button is still pressed do nothing
while (!rOK); // Check if button is still pressed, do nothing
}
if (!rCANCEL) // If button OK pressed
if (!rCANCEL) // If button CANCEL pressed
{
menuState = prevMenu;
while (!rCANCEL); // Check if button is still pressed do nothing
menuState = prevMenu; // set menuState to same value as prevMenu
while (!rCANCEL); // Check if button is still pressed, do nothing
}
}
@@ -422,9 +422,9 @@ void read_serial (void)
Serial.write(mySerial.read()); // redirect it to USB
}
if (Serial.available()) // If incoming NMEA0183 serial
if (Serial.available()) // If incoming USB serial
{
mySerial.write(Serial.read()); // redirect it to USB
mySerial.write(Serial.read()); // redirect it to NMEA0183 serial
}
}
@@ -432,7 +432,7 @@ void write_gps (void)
{
// Write NMEA0183 GPS sentence to USB
mySerial.print("$GPGGA,090000.10,6350.37829338,N,02225.18272240,W,1,05,2.87,160.00,M,-21.3213,M,,*64");
mySerial.println(); // Print on display
mySerial.println(); // Send string to NMEA0183 serial
delay(100);
}
@@ -440,7 +440,7 @@ void write_hdg (void)
{
// Write NMEA0183 Heading sentence to USB
mySerial.print("$HEHDT,268.4,T*27");
mySerial.println(); // Print on display
mySerial.println(); // Send string to NMEA0183 serial
delay(100);
}
@@ -448,6 +448,6 @@ void write_dep (void)
{
// Write NMEA0183 Depth sentence to USB
mySerial.print("$SDDBT,0038.0,f,0011.6,M,0006.3,F");
mySerial.println(); // Print on display
mySerial.println(); // Send string to NMEA0183 serial
delay(100);
}