-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRvalOut.ino
32 lines (27 loc) · 862 Bytes
/
RvalOut.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
#include <avr/io.h>
#include <avr/eeprom.h>
#include <avr/pgmspace.h>
#include "Transistortester.h"
#include "Makefile.h" //J-L
*/
void RvalOut(uint8_t nrr) {
// output of resistor value
union {
uint16_t pw; // return value from Rnum2pins()
uint8_t pb[2]; // the pin numbers LowPin and HighPin
} rpins; // resistor pin structure to prevent two return parameters
#if FLASHEND > 0x1fff
uint16_t rr;
if ((ResistorVal[nrr] < 100) && (inductor_lpre >= 0)) {
rpins.pw = Rnum2pins(nrr); // compute the pin numbers for resistor nrr
rr = GetESR(rpins.pb[1], rpins.pb[0]);
DisplayValue16(rr,-2,LCD_CHAR_OMEGA,3);
} else {
DisplayValue(ResistorVal[nrr],-1,LCD_CHAR_OMEGA,4);
}
#else
DisplayValue(ResistorVal[nrr],-1,LCD_CHAR_OMEGA,4);
#endif
lcd_space();
}