Rev 66 | Rev 70 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 66 | Rev 67 | ||
---|---|---|---|
Line 46... | Line 46... | ||
46 | SPI_RESET_Pin, |
46 | SPI_RESET_Pin, |
47 | SPI_NSS2_GPIO_Port, |
47 | SPI_NSS2_GPIO_Port, |
48 | SPI_NSS2_Pin)}; |
48 | SPI_NSS2_Pin)}; |
49 | 49 | ||
50 | displayDial_t dials[MAX_DISPLAYS] = |
50 | displayDial_t dials[MAX_DISPLAYS] = |
51 | {displayDial_t(displays[0], 64, 60, 60, 90), displayDial_t(displays[1], 64, |
51 | {displayFullDial_t(displays[0]), displayFullDial_t(displays[1])}; |
52 | 60, 60, 90)}; |
- | |
53 | #if defined __cplusplus |
52 | #if defined __cplusplus |
54 | extern "C" |
53 | extern "C" |
55 | { |
54 | { |
56 | #endif |
55 | #endif |
57 | static void |
56 | static void |
Line 116... | Line 115... | ||
116 | void |
115 | void |
117 | cc_check_nvram(int dialIndex) |
116 | cc_check_nvram(int dialIndex) |
118 | { |
117 | { |
119 | if (dialIndex < 0 && dialIndex > MAX_DISPLAYS) |
118 | if (dialIndex < 0 && dialIndex > MAX_DISPLAYS) |
120 | return; |
119 | return; |
- | 120 | // algorithm only works when there is a vector of observations |
|
- | 121 | if(PLXItems == 0) |
|
- | 122 | return; |
|
121 | context_t &context = contexts[dialIndex]; |
123 | context_t &context = contexts[dialIndex]; |
122 | 124 | ||
123 | // check for timer timeout on consistent timer |
125 | // check for timer timeout on consistent timer |
124 | 126 | ||
125 | if (context.dial_timer) |
127 | if (context.dial_timer) |
Line 254... | Line 256... | ||
254 | Info[itemIndex].Max); |
256 | Info[itemIndex].Max); |
255 | min_rdg = ConveriMFDRaw2Data((enum PLX_Observations)Observation, DisplayInfo[Observation].Units, |
257 | min_rdg = ConveriMFDRaw2Data((enum PLX_Observations)Observation, DisplayInfo[Observation].Units, |
256 | Info[itemIndex].Min); |
258 | Info[itemIndex].Min); |
257 | cur_rdg = ConveriMFDRaw2Data((enum PLX_Observations)Observation, DisplayInfo[Observation].Units, |
259 | cur_rdg = ConveriMFDRaw2Data((enum PLX_Observations)Observation, DisplayInfo[Observation].Units, |
258 | Info[itemIndex].data); |
260 | Info[itemIndex].data); |
259 | - | ||
260 | int dp_pos; // where to print the decimal place |
261 | int dp_pos; // where to print the decimal place |
261 | float scale = 1.0; |
262 | float scale = 1.0; |
262 | switch (DisplayInfo[Observation].DP) |
263 | switch (DisplayInfo[Observation].DP) |
263 | { |
264 | { |
264 | default: |
265 | default: |