AP_AIS: Make the char_to_hex method a common method

This commit is contained in:
murata 2021-11-03 09:08:42 +09:00 committed by Andrew Tridgell
parent f08866639e
commit 8743ca226c
2 changed files with 0 additions and 14 deletions

View File

@ -804,15 +804,4 @@ bool AP_AIS::decode_latest_term()
return false;
}
// return the numeric value of an ascii hex character
int16_t AP_AIS::char_to_hex(char a)
{
if (a >= 'A' && a <= 'F')
return a - 'A' + 10;
else if (a >= 'a' && a <= 'f')
return a - 'a' + 10;
else
return a - '0';
}
#endif // HAL_AIS_ENABLED

View File

@ -123,9 +123,6 @@ private:
// decode each term
bool decode_latest_term() WARN_IF_UNUSED;
// convert from char to hex value for checksum
int16_t char_to_hex(char a);
// varables for decoding NMEA sentence
char _term[AIVDM_PAYLOAD_SIZE]; // buffer for the current term within the current sentence
uint8_t _term_offset; // offset within the _term buffer where the next character should be placed