Commit dc09e119 authored by Rafael Pezzi's avatar Rafael Pezzi
Browse files

Movendo funções de interrupções para o arquivo .ino

parent 50f41dd8
......@@ -6,17 +6,3 @@ int syncClockGPS()
//É de importância crítica pois usamos o tempo exato do evento para
//determinar se um segundo detector também registrou o mesmo evento
}
ICACHE_RAM_ATTR void interrupt_call()
{
event_flag = true;
pmt_signal = cpamp->readCPAmp();
event_time = syncClockGPS();
delay(0);
}
void interrupt_Setup()
{
pinMode(Trigger_Pin, INPUT);
attachInterrupt(digitalPinToInterrupt(Trigger_Pin), interrupt_call, RISING);
}
......@@ -23,6 +23,21 @@ unsigned long queue_last_time = 0;
unsigned long sensors_last_time = 0;
#define SnH_Reset 300
ICACHE_RAM_ATTR void interrupt_call()
{
event_flag = true;
pmt_signal = cpamp->readCPAmp();
event_time = syncClockGPS();
delay(0);
}
void interrupt_Setup()
{
pinMode(Trigger_Pin, INPUT);
attachInterrupt(digitalPinToInterrupt(Trigger_Pin), interrupt_call, RISING);
}
void setup() {
loadConfig();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment