Ho aggiornato sia il leOS che il leOS2 con la possibilità di aggiungere un task che deve essere avviato non appena questo viene aggiunto allo scheduler.
Ciò è possibile specificando la parola chiave SCHEDULED_IMMEDIATESTART per lo stato del task.
Esempio:
myOS.addTask(miaFunzione, intervallo, SCHEDULED_IMMEDIATESTART);
Precedentemente, il task veniva eseguito la prima volta solo dopo che era passato l’intervallo specificato.
La nuova caratteristica è disponibile nelle versioni 1.0.3 del leOS e 2.1.1 del leOS2, scaricabili da questa pagina.
Hello..
I have downloaded the latest version of LeOS and followed the instructions given in the README file. I am using an ATmegaa32 chip using ARDUINO 1.0 IDE on linux system. I have not been able to compile the included example codes. The compiler throws up the following error:
/home/architect/arduino-1.0/libraries/leOS2/leOS2.cpp: In function ‘void WDT_vect()’:
/home/architect/arduino-1.0/libraries/leOS2/leOS2.cpp:253:32: error: ‘WDIE’ was not declared in this scope
/home/architect/arduino-1.0/libraries/leOS2/leOS2.cpp: In member function ‘void leOS2::setWDT()’:
/home/architect/arduino-1.0/libraries/leOS2/leOS2.cpp:330:23: error: ‘WDIE’ was not declared in this scope
Can you direct me to resolve this issue.
P.S. All other arduino codes have been working well using the ATmega32 chip though its not officially supported.
That’s my fault. I couldn’t check every datasheet from Atmel so I only checked the most relevant ones, the ones that could refer to Arduino. I didn’t check the Atmega32 so I didn’t verify if this chip had a WDT that supported both internet and reset signals. The Atmega32 doesn’t support the interrupt rising for the WDT overflow so leOS2 won’t run on that chip.
Thanks for the clarifications.
Can you give out any hints to modify the code to be used with mega32 ?
Uhm… leOS2 is based on a specific mechanism: it uses the WatchDog to generate an interrupt, that is catched by a specific ISR. If there’s no ability to raise an interrupt signal by the MCU, there’s no possibility to use the leOS2 library. You could try to modify the leOS v.1 library to adapt it to work on the Mega32. Of course, leOS1 is a little bit different than leOS2 in its way of operation.
Ok..Maybe I can give it a try. Thanks again !