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: mbed DRV88255 TextLCD Ping mbed-rtos
AlarmController.h
- Committer:
- joran
- Date:
- 2016-06-15
- Revision:
- 47:a73b8640fb60
- Parent:
- 43:0abb54448b75
- Child:
- 48:d7053e51b30a
File content as of revision 47:a73b8640fb60:
#ifndef __ALARMCONTROLLER_H__ #define __ALARMCONTROLLER_H__ #include "mbed.h" #include "SensorController.h" #include "PIDController.h" #include "testing.h" #define STARTUP_ITERATIONS 10 class AlarmController : public Controller { public: AlarmController(bool threaded, int interval_ms, SensorController *temp, SensorController *salt, SensorController *proximity) : Controller(threaded, interval_ms) { this->temp = temp; this->salt = salt; this->proximity = proximity; this->error = false; this->tempiscrit = false; this->saltiscrit = false; this->overflowiscrit = false; } virtual void update(); virtual std::string get_name(); bool is_error(); char *get_error_message(); void buzzOnce(); void raiseAlarmTemp(bool); void raiseAlarmSalt(bool); void raiseAlarmOverFlow(bool); private: SensorController *temp; SensorController *salt; SensorController *proximity; bool error; char *error_msg; void activate_buzzer(); bool tempiscrit; bool saltiscrit; bool overflowiscrit; }; #endif