Make IntervalTimer stub so simulator works

This commit is contained in:
John Stäck 2019-10-16 15:28:01 +02:00
parent 88b38b3f46
commit f36129d4bb
3 changed files with 28 additions and 9 deletions

View file

@ -261,6 +261,16 @@ bool configManagementMode = false;
//_______________________________________________________________________________________________ SETUP
//Update CV output pin, run from timer.
void cvUpdate(){
int cvPressure = analogRead(breathSensorPin);
if(dacModeCopy == DAC_MODE_PITCH){
analogWrite(pwmDacPin,cvPressure);
} else { //DAC_MODE_BREATH
analogWrite(dacPin,map(constrain(cvPressure,brZero,4095),brZero,4095,0,4095));
}
}
void setup() {
analogReadResolution(12); // set resolution of ADCs to 12 bit
@ -802,15 +812,6 @@ void loop() {
//_______________________________________________________________________________________________ FUNCTIONS
void cvUpdate(){
int cvPressure = analogRead(breathSensorPin);
if(dacModeCopy == DAC_MODE_PITCH){
analogWrite(pwmDacPin,cvPressure);
} else { //DAC_MODE_BREATH
analogWrite(dacPin,map(constrain(cvPressure,brZero,4095),brZero,4095,0,4095));
}
}
// non linear mapping function (http://playground.arduino.cc/Main/MultiMap)
// note: the _in array should have increasing values