DataFlash: tighten types up to save flash space

Saves about 1,500 bytes!
This commit is contained in:
Peter Barker 2018-02-22 20:38:58 +11:00 committed by Andrew Tridgell
parent 50c3ed1460
commit 7308c9aa7b
2 changed files with 3 additions and 3 deletions

View File

@ -339,7 +339,7 @@ private:
// possibly expensive calls to start log system:
void Prep();
bool _writes_enabled;
bool _writes_enabled:1;
/* support for retrieving logs via mavlink: */
uint8_t _log_listing:1; // sending log list

View File

@ -60,7 +60,7 @@ struct PACKED log_Format_Units {
struct UnitStructure {
const char ID;
const char unit[64];
const char *unit;
};
struct MultiplierStructure {
@ -113,9 +113,9 @@ const struct UnitStructure log_Units[] = {
// tl;dr a GCS shouldn't/mustn't infer any scaling from the unit name
const struct MultiplierStructure log_Multipliers[] = {
// <leave a gap here, just in case....>
{ '-', 0 }, // no multiplier e.g. a string
{ '?', 1 }, // multipliers which haven't been worked out yet....
// <leave a gap here, just in case....>
{ '2', 1e2 },
{ '1', 1e1 },
{ '0', 1e0 },