-
Notifications
You must be signed in to change notification settings - Fork 35
Sine wave pH #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sine wave pH #269
Changes from 25 commits
ecc2148
551a89d
08e7942
17cdac9
71685f5
66d00f9
918a3b2
de07b58
d45d4d7
71a7f39
117fbd5
ded8db7
5239bc6
59e0391
f63a81c
95e4690
a45b572
bad440a
9b317c6
040969d
cbf711d
4d14017
45659ff
479c366
8e60487
4da18f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,6 +61,7 @@ highpoint | |
| HIGHTHRESH | ||
| homepage | ||
| HSCROLL | ||
| HSet | ||
| http | ||
| ifdef | ||
| ine | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| #!/bin/bash | ||
| bundle config set --local path 'vendor/bundle' | ||
| bundle install | ||
| bundle exec arduino_ci.rb --min-free-space=5990 | tee output.txt | ||
| bundle exec arduino_ci.rb --min-free-space=5960 | tee output.txt | ||
| result="${PIPESTATUS[0]}" | ||
| tail -n 4 output.txt | head -n 2 > size.txt | ||
| exit "$result" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| Sketch uses 75918 bytes (29%) of program storage space. Maximum is 253952 bytes. | ||
| Global variables use 2194 bytes (26%) of dynamic memory, leaving 5998 bytes for local variables. Maximum is 8192 bytes. | ||
| Sketch uses 77948 bytes (30%) of program storage space. Maximum is 253952 bytes. | ||
| Global variables use 2224 bytes (27%) of dynamic memory, leaving 5968 bytes for local variables. Maximum is 8192 bytes. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -108,15 +108,24 @@ float EEPROM_TC::getPHSeriesPointer() { | |
| float EEPROM_TC::getPHSeriesSize() { | ||
| return eepromReadFloat(PH_SERIES_SIZE_ADDRESS); | ||
| } | ||
| uint32_t EEPROM_TC::getRampTimeStart() { | ||
| uint32_t EEPROM_TC::getPhRampTimeStart() { | ||
| return eepromReadInt(RAMP_TIME_START_PH_ADDRESS); | ||
| } | ||
| uint32_t EEPROM_TC::getRampTimeEnd() { | ||
| uint32_t EEPROM_TC::getPhRampTimeEnd() { | ||
| return eepromReadInt(RAMP_TIME_END_PH_ADDRESS); | ||
| } | ||
| float EEPROM_TC::getRampStartingPH() { | ||
| return eepromReadFloat(RAMP_STARTING_PH_ADDRESS); | ||
| } | ||
| uint32_t EEPROM_TC::getPhSineStartTime() { | ||
| return eepromReadInt(PH_SINE_START_TIME_ADDRESS); | ||
| } | ||
| uint32_t EEPROM_TC::getPhSinePeriod() { | ||
| return eepromReadInt(PH_SINE_AMPLITUDE_ADDRESS); | ||
| } | ||
| float EEPROM_TC::getPhSineAmplitude() { | ||
| return eepromReadFloat(PH_SINE_PERIOD_ADDRESS); | ||
| } | ||
| uint32_t EEPROM_TC::getRampTimeStartTemp() { | ||
| return eepromReadInt(RAMP_TIME_START_TEMP_ADDRESS); | ||
| } | ||
|
|
@@ -126,6 +135,9 @@ uint32_t EEPROM_TC::getRampTimeEndTemp() { | |
| float EEPROM_TC::getRampStartingTemp() { | ||
| return eepromReadFloat(RAMP_STARTING_TEMP_ADDRESS); | ||
| } | ||
| uint16_t EEPROM_TC::getPHSetType() { | ||
| return static_cast<uint16_t>(eepromReadFloat(PH_SET_TYPE_ADDRESS)); | ||
| } | ||
| uint16_t EEPROM_TC::getTankID() { | ||
| return static_cast<uint16_t>(eepromReadFloat(TANK_ID_ADDRESS)); | ||
| } | ||
|
|
@@ -204,6 +216,15 @@ void EEPROM_TC::setPhRampTimeEnd(uint32_t value) { | |
| void EEPROM_TC::setRampStartingPH(float value) { | ||
| eepromWriteFloat(RAMP_STARTING_PH_ADDRESS, value); | ||
| } | ||
| void EEPROM_TC::setPhSineStartTime(uint32_t value) { | ||
| eepromWriteInt(PH_SINE_START_TIME_ADDRESS, value); | ||
| } | ||
| void EEPROM_TC::setPhSinePeriod(uint32_t value) { | ||
| eepromWriteInt(PH_SINE_AMPLITUDE_ADDRESS, value); | ||
| } | ||
| void EEPROM_TC::setPhSineAmplitude(float value) { | ||
| eepromWriteFloat(PH_SINE_PERIOD_ADDRESS, value); | ||
| } | ||
| void EEPROM_TC::setRampTimeStartTemp(uint32_t value) { | ||
| eepromWriteInt(RAMP_TIME_START_TEMP_ADDRESS, value); | ||
| } | ||
|
|
@@ -213,6 +234,9 @@ void EEPROM_TC::setRampTimeEndTemp(uint32_t value) { | |
| void EEPROM_TC::setRampStartingTemp(float value) { | ||
| eepromWriteFloat(RAMP_STARTING_TEMP_ADDRESS, value); | ||
| } | ||
| void EEPROM_TC::setPHSetType(uint16_t value) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Ph" or "PH"? Lets be consistent and make it always "Ph" in the function names. |
||
| eepromWriteFloat(PH_SET_TYPE_ADDRESS, (float)value); | ||
| } | ||
| void EEPROM_TC::setTankID(uint16_t value) { | ||
| eepromWriteFloat(TANK_ID_ADDRESS, (float)value); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,16 +26,20 @@ class EEPROM_TC { | |
| void getMac(uint8_t* bytes); // used for DHCP request for IP address | ||
| float getMaxDataAge(); // not used | ||
| float getPH(); // target pH | ||
| uint32_t getRampTimeStart(); | ||
| uint32_t getRampTimeEnd(); | ||
| uint32_t getPhRampTimeStart(); | ||
| uint32_t getPhRampTimeEnd(); | ||
| float getRampStartingPH(); | ||
| uint32_t getPhSineStartTime(); | ||
| uint32_t getPhSinePeriod(); | ||
| float getPhSineAmplitude(); | ||
| uint32_t getRampTimeStartTemp(); | ||
| uint32_t getRampTimeEndTemp(); | ||
| float getRampStartingTemp(); | ||
| float getPHDelay(); // not used | ||
| float getPHInterval(); // not used | ||
| float getPHSeriesPointer(); // not used | ||
| float getPHSeriesSize(); // not used | ||
| float getPHDelay(); // not used | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Ph" or "PH"? Lets be consistent and make it always "Ph" in the function names. Update for the whole file. |
||
| float getPHInterval(); // not used | ||
| float getPHSeriesPointer(); // not used | ||
| float getPHSeriesSize(); // not used | ||
| uint16_t getPHSetType(); | ||
| uint16_t getTankID(); // unique tank identifier for reporting | ||
| float getTemp(); // target temperature | ||
| float getTempDelay(); // not used | ||
|
|
@@ -59,13 +63,17 @@ class EEPROM_TC { | |
| void setPhRampTimeStart(uint32_t value); | ||
| void setPhRampTimeEnd(uint32_t value); | ||
| void setRampStartingPH(float value); | ||
| void setPhSineStartTime(uint32_t value); | ||
| void setPhSinePeriod(uint32_t value); | ||
| void setPhSineAmplitude(float value); | ||
| void setRampTimeStartTemp(uint32_t value); | ||
| void setRampTimeEndTemp(uint32_t value); | ||
| void setRampStartingTemp(float value); | ||
| void setPHDelay(float value); | ||
| void setPHInterval(float value); | ||
| void setPHSeriesPointer(float value); | ||
| void setPHSeriesSize(float value); | ||
| void setPHSetType(uint16_t value); | ||
| void setTankID(uint16_t value); | ||
| void setTemp(float value); | ||
| void setTempDelay(float value); | ||
|
|
@@ -104,9 +112,13 @@ class EEPROM_TC { | |
| const uint16_t RAMP_STARTING_PH_ADDRESS = 112; | ||
| const uint16_t RAMP_TIME_START_PH_ADDRESS = 116; | ||
| const uint16_t RAMP_TIME_END_PH_ADDRESS = 120; | ||
| const uint16_t PH_SINE_AMPLITUDE_ADDRESS = 112; | ||
| const uint16_t PH_SINE_START_TIME_ADDRESS = 116; | ||
| const uint16_t PH_SINE_PERIOD_ADDRESS = 120; | ||
| const uint16_t RAMP_STARTING_TEMP_ADDRESS = 124; | ||
| const uint16_t RAMP_TIME_START_TEMP_ADDRESS = 128; | ||
| const uint16_t RAMP_TIME_END_TEMP_ADDRESS = 132; | ||
| const uint16_t PH_SET_TYPE_ADDRESS = 136; | ||
|
|
||
| // class variables | ||
| static EEPROM_TC* _instance; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Ph" or "PH"? Lets be consistent and make it always "Ph" in the function names.