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
cortar.cpp
00001 #include "appCommands.h" 00002 #include "sensor.h" 00003 00004 #define CORTAR_SUCESSO 0 00005 #define CORTAR_NAO_CONFIRMADO 1 00006 00007 extern DigitalOut reset_relay; 00008 00009 void cmdCortar(){ 00010 reset_relay = RELE_ON; 00011 wait_ms(APP_PARAMETERS.CORTAR_LARGURA_PULSO_MS); 00012 reset_relay = RELE_OFF; 00013 atualizaEstadoRele(ESTADO_RELE_ABERTO); 00014 wait_ms(APP_PARAMETERS.DELAY_SENSOR_MS); 00015 if(getSensorState(APP_PARAMETERS.LOAD_CHANNEL) == SENSOR_COM_FORNECIMENTO){ 00016 exec.enviaResposta(RESP_CORTAR, CORTAR_NAO_CONFIRMADO); 00017 } else{ 00018 exec.enviaResposta(RESP_CORTAR, CORTAR_SUCESSO); 00019 } 00020 }
Generated on Thu Jul 14 2022 00:24:57 by
1.7.2
