Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 63310bdd03 | |||
| 1954ff8d9e |
+5
-4
@@ -624,7 +624,7 @@ static void cali_IT_plot(WorkMode *WorkModeData) {
|
||||
}
|
||||
}else{
|
||||
static uint16_t cali_count = 0;
|
||||
if(cali_count >= 1000){
|
||||
if(cali_count >= 5000){
|
||||
ADCValueAVG = ADCValueSUM / cali_count;
|
||||
|
||||
InputNotify(NOTIFY_CURRENT, ADCValueAVG);
|
||||
@@ -642,12 +642,13 @@ static void cali_IT_plot(WorkMode *WorkModeData) {
|
||||
|
||||
PeriodicEvent = false;
|
||||
ModeLED(NO_EVENT);
|
||||
|
||||
}else{
|
||||
cali_count++;
|
||||
ADCValueSUM = ADCValueSUM + CURRENT_MODE->_measureCurrent;
|
||||
InputNotify(NOTIFY_CURRENT, CURRENT_MODE->_measureCurrent);
|
||||
InputNotify(NOTIFY_VOLT, ADCValueSUM);
|
||||
InputNotify(NOTIFY_IMPEDANCE, (int32_t)cali_count);
|
||||
// InputNotify(NOTIFY_CURRENT, CURRENT_MODE->_measureCurrent);
|
||||
// InputNotify(NOTIFY_VOLT, ADCValueSUM);
|
||||
// InputNotify(NOTIFY_IMPEDANCE, (int32_t)cali_count);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-3
@@ -618,11 +618,13 @@ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) {
|
||||
if (!PeriodicEvent) { // if there is no periodic event
|
||||
key = PIN_getInputValue(switch_on);
|
||||
if (EliteOn) {
|
||||
if (counter6994 < CLOCK_ONE_SECOND/2) { // counter6994 enable a IC after 35 counts
|
||||
if (counter6994 < CLOCK_ONE_SECOND*5) { // counter6994 enable a IC after 35 counts
|
||||
counter6994++;
|
||||
} else if (counter6994 == CLOCK_ONE_SECOND/2) {
|
||||
PIN15_setOutputValue(shutdown_6994, 1); // OFF = 1 => turn off 6994
|
||||
} else if (counter6994 == CLOCK_ONE_SECOND*5) {
|
||||
PIN15_setOutputValue(shutdown_6994, 0); // OFF = 1 => turn off 6994
|
||||
counter6994++;
|
||||
} else if (counter6994 > CLOCK_ONE_SECOND*5) {
|
||||
counter6994 = 0;
|
||||
}
|
||||
EliteKeyPress(key);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user