Warning about scaling

This commit is contained in:
Rick Sellens 2020-01-30 17:09:35 -05:00
parent d14e220c1b
commit d0f7f47dc9
1 changed files with 5 additions and 1 deletions

View File

@ -367,7 +367,11 @@ void Adafruit_GPS::initDataValue(nmea_index_t idx, char *label, char *fmt,
/*! /*!
@brief Attempt to add history to a data value table entry. If it fails @brief Attempt to add history to a data value table entry. If it fails
to malloc the space, history will not be added. Test the pointer for a to malloc the space, history will not be added. Test the pointer for a
check if needed. check if needed. Select scale and offset values carefully so that
operations and results will fit inside 16 bit integer limits. For example
a scale of 1.0 and an offset of 100000.0 would be a good choice for
atmospheric pressure in Pa with values ranging ~ +/- 3500, while a scale
of 10.0 would be pushing the integer limits.
@param idx The data index for the value to have history recorded @param idx The data index for the value to have history recorded
@param scale Value for scaling the integer history list @param scale Value for scaling the integer history list
@param offset Value for scaling the integer history list @param offset Value for scaling the integer history list