some sanity-check
This commit is contained in:
		| @@ -1,5 +1,12 @@ | |||||||
| #include "common.h" | #include "common.h" | ||||||
|  |  | ||||||
|  | #define ARR_LEN(a) (sizeof(a)/sizeof((a)[0])) | ||||||
|  |  | ||||||
|  | static_assert(ARR_LEN(SystemStatusString)  == SYSSTAT_COUNT,      "SystemStatusString size mismatch"); | ||||||
|  | static_assert(ARR_LEN(SpeedSourceString)   == SPEEDSOURCE_COUNT,   "SpeedSourceString size mismatch"); | ||||||
|  | static_assert(ARR_LEN(GPSBaudRateString)   == GPSBAUDRATE_COUNT,   "GPSBaudRateString size mismatch"); | ||||||
|  | static_assert(ARR_LEN(CANSourceString)     == CANSOURCE_COUNT,     "CANSourceString size mismatch"); | ||||||
|  |  | ||||||
| static const char kUnknownStr[] = "Unknown"; | static const char kUnknownStr[] = "Unknown"; | ||||||
|  |  | ||||||
| // ---- System status string table ---- | // ---- System status string table ---- | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user