EZR

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

Fork of smartRamalKW by Equipe Firmware V2COM

sensor.cpp

Committer:
tpadovani
Date:
2015-06-22
Revision:
7:fe8e827f4d1b
Parent:
5:1bc98277c257
Child:
8:e8d86c66283c

File content as of revision 7:fe8e827f4d1b:

#include "sensor.h"

extern AnalogIn voltage;
extern ParametersBlock APP_PARAMETERS;

bool getEstadoSensor(){
    float limit = APP_PARAMETERS.LIMITE_TENSAO_SENSOR_V * 0.01;
    if(voltage > limit){
        return SENSOR_COM_FORNECIMENTO;
    } else{
        return SENSOR_SEM_FORNECIMENTO;
    }
}