Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: CRC16 FreescaleIAP FreescaleWatchdog GGSProtocol LM75B PIMA Parameters PersistentCircularQueue SerialNumberV2COM mbed-dev-watchdog_2016_03_04
Fork of smartRamalKW by
cmd/estadoFornecimento.cpp@8:e8d86c66283c, 2015-07-02 (annotated)
- Committer:
- tpadovani
- Date:
- Thu Jul 02 22:57:47 2015 +0000
- Revision:
- 8:e8d86c66283c
- Parent:
- 5:1bc98277c257
- Child:
- 9:e501499af4ef
Implementa??o inicial de c?lculo de tens?o RMS da carga e linha. Novo comando para obter as tens?es de carga e linha.
Who changed what in which revision?
| User | Revision | Line number | New 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 | 5:1bc98277c257 | 8 | char estado = 0; |
| tpadovani | 8:e8d86c66283c | 9 | if(getEstadoSensor(0) == SENSOR_COM_FORNECIMENTO){ |
| tpadovani | 5:1bc98277c257 | 10 | estado = COD_RESP_COM_FORNECIMENTO; |
| tpadovani | 5:1bc98277c257 | 11 | } else{ |
| tpadovani | 5:1bc98277c257 | 12 | estado = COD_RESP_SEM_FORNECIMENTO; |
| tpadovani | 5:1bc98277c257 | 13 | } |
| tpadovani | 5:1bc98277c257 | 14 | |
| tpadovani | 5:1bc98277c257 | 15 | exec.enviaResposta(RESP_ESTADO_FORNECIMENTO, estado); |
| tpadovani | 5:1bc98277c257 | 16 | } |
