Frederico Prado / smartRamalEZR

Dependencies:   CRC16 FreescaleIAP FreescaleWatchdog GGSProtocol LM75B PIMA Parameters PersistentCircularQueue SerialNumberV2COM mbed-dev-watchdog_2016_03_04

Fork of smartRamalKW by Equipe Firmware V2COM

Committer:
tpadovani
Date:
Mon Oct 19 20:34:15 2015 +0000
Revision:
22:b66e36356dd4
Parent:
9:e501499af4ef
debug condicional

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tpadovani 5:1bc98277c257 1 #include "appCommands.h"
tpadovani 5:1bc98277c257 2 #include "sensor.h"
tpadovani 5:1bc98277c257 3
tpadovani 5:1bc98277c257 4 #define COD_RESP_COM_FORNECIMENTO 0
tpadovani 5:1bc98277c257 5 #define COD_RESP_SEM_FORNECIMENTO 1
tpadovani 5:1bc98277c257 6
tpadovani 5:1bc98277c257 7 void cmdEstadoFornecimento(){
tpadovani 22:b66e36356dd4 8 char state;
tpadovani 22:b66e36356dd4 9 if(getSensorState(APP_PARAMETERS.LOAD_CHANNEL) == SENSOR_COM_FORNECIMENTO){
tpadovani 22:b66e36356dd4 10 state = COD_RESP_COM_FORNECIMENTO;
tpadovani 5:1bc98277c257 11 } else{
tpadovani 22:b66e36356dd4 12 state = COD_RESP_SEM_FORNECIMENTO;
tpadovani 5:1bc98277c257 13 }
tpadovani 5:1bc98277c257 14
tpadovani 22:b66e36356dd4 15 exec.enviaResposta(RESP_ESTADO_FORNECIMENTO, state);
tpadovani 5:1bc98277c257 16 }