I was wondering if it is possible to create an array of enums like this:
typedef enum {
LABEL,
SCREEN_BUFFER,
PID,
ENABLED,
NUM_BYTES
} SENSOR;
static SENSOR sensors[] = {
// formula // label //screen_buffer //pid //enabled // bytes
{ "Absolute Throttle Position:", "", "11", 1, 1 },
{ "Engine RPM:", "", "0C", 1, 2 },
{ "Vehicle Speed:", "", "0D", 1, 1 }
};
If this is not possible would someone give me some pointers on how to create something similar without have to build a class for each entry and storing it in a list or something like it. I'm trying to create a static array of a bunch of information about each sensor I can access on my vehicle through its OBD-II port.