Make IntervalTimer stub so simulator works
This commit is contained in:
parent
88b38b3f46
commit
f36129d4bb
3 changed files with 28 additions and 9 deletions
|
@ -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
|
||||
|
|
17
simulation/include/interrupts.h
Normal file
17
simulation/include/interrupts.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef __INTERRUPTS_H
|
||||
#define __INTERRUPTS_H
|
||||
|
||||
//Dummy functions, used by macros for interrupts() / noInterrupts()
|
||||
void __enable_irq() {}
|
||||
void __disable_irq() {}
|
||||
|
||||
|
||||
struct IntervalTimer
|
||||
{
|
||||
public:
|
||||
IntervalTimer() {};
|
||||
bool begin(void (*funct)(), unsigned int microseconds) { };
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
#include "examples/imgui_impl_opengl3.h"
|
||||
#include "EEPROM.h"
|
||||
#include "simusbmidi.h"
|
||||
#include "interrupts.h"
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue