-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from aleemont1/davide
Davide
- Loading branch information
Showing
47 changed files
with
1,577 additions
and
862 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ lib_deps = | |
marcoschwartz/LiquidCrystal_I2C@^1.1.4 | ||
arduino-libraries/Servo@^1.2.1 | ||
nabontra/[email protected]+sha.2bf7fb3c17 | ||
paulstoffregen/TimerOne@^1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#ifndef __CONFIG__ | ||
#define __CONFIG__ | ||
#define __DEBUG__ | ||
|
||
#include "Arduino.h" | ||
|
||
constexpr int BASE_PERIOD = 100; | ||
constexpr int POT_PIN = A0; | ||
constexpr int BUTTON_PIN = 4; | ||
constexpr long TIME_OUT_CONNECTION = 300000L; | ||
constexpr int SERVO_PIN = 9; | ||
constexpr int TIME_TO_MOVE = 20; | ||
|
||
#endif // __CONFIG__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#ifndef __WATERCHANNELCONTROLLER__ | ||
#define __WATERCHANNELCONTROLLER__ | ||
|
||
#include "Arduino.h" | ||
|
||
/** | ||
* @brief Enum for the modes of the water channel controller. | ||
* | ||
* This enum represents the possible modes of the water channel controller: Automatic and Manual. | ||
*/ | ||
enum class Mode | ||
{ | ||
AUTOMATIC, | ||
MANUAL, | ||
ALARM_TOO_LOW, | ||
NORMAL, | ||
PRE_ALARM_TOO_HIGH, | ||
ALARM_TOO_HIGH, | ||
ALARM_TOO_HIGH_CRITIC | ||
}; | ||
|
||
/** | ||
* @brief A controller for a water channel. | ||
* | ||
* This class represents a controller for a water channel. The controller can be in one of two modes: Automatic or Manual. | ||
* The controller has an active position and flags to indicate whether the communication or position has changed. | ||
*/ | ||
class WaterChannelController | ||
{ | ||
public: | ||
bool commChange; ///< Flag to indicate whether the communication has changed. | ||
bool posChange; ///< Flag to indicate whether the position has changed. | ||
Mode activeMode; ///< The active mode of the controller. | ||
unsigned int activePosition; ///< The active position of the controller. | ||
}; | ||
|
||
#endif // __WATERCHANNELCONTROLLER__ |
13 changes: 0 additions & 13 deletions
13
water-channel-controller/src/WaterChannelController/State.h
This file was deleted.
Oops, something went wrong.
163 changes: 0 additions & 163 deletions
163
water-channel-controller/src/WaterChannelController/WaterChannelController.h
This file was deleted.
Oops, something went wrong.
114 changes: 0 additions & 114 deletions
114
water-channel-controller/src/WaterChannelController/WaterChannelControllerImpl.cpp
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.