EZR
Dependencies: CRC16 FreescaleIAP FreescaleWatchdog GGSProtocol LM75B PIMA Parameters PersistentCircularQueue SerialNumberV2COM mbed-dev-watchdog_2016_03_04
Fork of smartRamalKW by
cmd/tensaoInstantanea.cpp
- Committer:
- tpadovani
- Date:
- 2015-07-23
- Revision:
- 10:7a1d1abb5172
- Parent:
- 9:e501499af4ef
- Child:
- 11:8c93e0de58cd
File content as of revision 10:7a1d1abb5172:
#include "appCommands.h" #include "sensor.h" void cmdTensaoInstantanea(unsigned char lineOrLoad){ int channel; if(lineOrLoad == APP_PARAMETERS.LOAD_CHANNEL){ channel = 0; } else{ channel = 1; } union{ float tensao; char bytes[4]; } resp; resp.tensao = getTensaoInstantanea(channel); exec.enviaResposta(RESP_TENSAO_INSTANTANEA, resp.bytes, 4); }