Skip to content
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

Record "remote log" events #446

Open
wants to merge 76 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
feab701
Alert Pusher (#437)
je-foster Sep 15, 2023
64d045e
Tests run again (#438)
je-foster Oct 5, 2023
ad0920f
Simplify lint rules file.
jgfoster Feb 7, 2024
6c445b8
Lint issues.
jgfoster Mar 2, 2024
a493aea
AlertPusherTest now passes.
jgfoster Mar 13, 2024
7ecd31f
DataLoggerTest now passes.
jgfoster Mar 13, 2024
a8852f7
PHProbeTest.cpp now passes.
jgfoster Mar 13, 2024
99876b9
SDTest.cpp now passes, along with all others!
jgfoster Mar 13, 2024
15dfd99
The stdev seems to be different on my local runs from that on the Git…
jgfoster Mar 13, 2024
01bf586
WIP on defer network when bubbler is on.
jgfoster Mar 13, 2024
c60084a
Disable Arduino-CI tests (for now).
jgfoster Mar 14, 2024
8268ece
Start on event log.
jgfoster Mar 15, 2024
6a177c2
Newline at end of file.
jgfoster Apr 24, 2024
d29cbf4
Formatting.
jgfoster Apr 24, 2024
0362ef6
Merge branch 'main' into event_log
jgfoster Jun 18, 2024
2e19029
Rename event log to remote log.
jgfoster Jun 18, 2024
5895b60
Change formatting.
jgfoster Jun 18, 2024
60f356e
Merge branch 'remote_log' into alerts
jgfoster Jun 18, 2024
2df4fb9
Edits to get things to compile.
jgfoster Jun 18, 2024
25672bf
More formatting (Arduino CI tests are disabled).
jgfoster Jun 18, 2024
a8e9d20
More formatting changes.
jgfoster Jun 18, 2024
8273a9b
Merge branch 'main' into alerts
jgfoster Jun 19, 2024
a5ce38b
Merge branch 'main' into alerts
jgfoster Jun 20, 2024
ac7a1d4
Merge branch 'main' into alerts
jgfoster Jul 24, 2024
9697b3a
Formatting.
jgfoster Jul 24, 2024
9c13e16
More formatting.
jgfoster Jul 24, 2024
ae545b2
Revert code removed from PHProbe.cpp.
jgfoster Jul 24, 2024
29283b7
Change code order to match main.
jgfoster Jul 24, 2024
9967a97
Update ThermalProbeTest.cpp from main.
jgfoster Jul 24, 2024
6565091
Move PORT from Ethernet_TC.h to AlertPusher.cpp.
jgfoster Jul 24, 2024
646c13e
Bump versions.
jgfoster Aug 14, 2024
9fd6dcf
Merge branch 'main' into alerts
jgfoster Aug 14, 2024
08d5fbf
Update libraries; add `flutter.js.map` files to avoid client errors.
jgfoster Oct 10, 2024
697c9bb
Merge branch 'main' into alerts
jgfoster Oct 11, 2024
9b12ad7
Merge main into alerts.
jgfoster Dec 24, 2024
b90b205
Change for deprecated Flutter function.
jgfoster Dec 26, 2024
224bb29
Consolidate all the setup into the `instance()` method.
jgfoster Dec 26, 2024
b038540
Merge branch 'december' into alerts.
jgfoster Dec 26, 2024
2409e71
Update Flutter version.
jgfoster Dec 26, 2024
3e77338
Add debugging to JSONBuilderTest.cpp to see how far it gets.
jgfoster Dec 26, 2024
a633812
Further debugging of JSONBuilderTest. Don't expect float to be exactl…
jgfoster Dec 26, 2024
25d2a02
Show test class in some tests.
jgfoster Dec 26, 2024
4a786cd
Merge branch 'december' into alerts; fix SDTest.cpp and PHProbeTest.cpp.
jgfoster Dec 26, 2024
9f72038
Fix formatting.
jgfoster Dec 26, 2024
2cec546
More formatting.
jgfoster Dec 26, 2024
71cf1f6
Work on RemoteLogPusherTest (it passed, but others fail now).
jgfoster Dec 27, 2024
fd6791c
SDTest and PushingBoxTest now pass.
jgfoster Dec 27, 2024
8fb7f2b
All tests pass locally.
jgfoster Dec 27, 2024
be0bd3e
Enable device controller test.
jgfoster Dec 27, 2024
2a134cd
Fix codacy issue (it found a bug!).
jgfoster Dec 27, 2024
9636fd3
Fix Codacy issue (bug).
jgfoster Dec 27, 2024
6066097
Switch default to hide loop delay for easier testing.
jgfoster Dec 27, 2024
981577b
Formatting.
jgfoster Dec 27, 2024
94b3618
Merge from december updates.
jgfoster Dec 27, 2024
059a719
Merge branch 'main' into alerts. Test failures in:
jgfoster Jan 8, 2025
1a313e3
Tests now pass.
jgfoster Jan 9, 2025
026e8b3
Update Makefile to make it easier to compare with main.
jgfoster Jan 9, 2025
dbf044b
Refactor Makefile.
jgfoster Jan 14, 2025
6c43f5d
Use PHControl::instance()->loop()
jgfoster Jan 14, 2025
ecaccea
Add files for RemoteLogPusher.
jgfoster Jan 14, 2025
eb74837
Continuing small changes.
jgfoster Jan 14, 2025
5784649
Most of the way back with tests passing.
jgfoster Jan 14, 2025
93f53a8
Merge branches 'main' and 'january' into alerts
jgfoster Jan 14, 2025
89b957a
- Update Makefile to match alerts.
jgfoster Jan 14, 2025
e4cce23
Use tabs instead of spaces in Makefile.
jgfoster Jan 14, 2025
9a3751e
A few more things from the alerts branch.
jgfoster Jan 14, 2025
1510718
Update a few tests to match alerts.
jgfoster Jan 15, 2025
a391002
Upgrade libraries.
jgfoster Jan 15, 2025
4a3c413
Merge main into january.
jgfoster Jan 15, 2025
f9b258d
Bring alerts branch closer to january branch.
jgfoster Jan 15, 2025
1fdafdb
- Add RemoteLogPusher code.
jgfoster Jan 15, 2025
64de97d
Import changes from january branch to alerts branch.
jgfoster Jan 15, 2025
1829722
Restore some commented-out test code.
jgfoster Jan 15, 2025
108e0ce
All tests pass with RemoteLogPusher!
jgfoster Jan 15, 2025
7100abb
Merge branch 'january' into alerts
jgfoster Jan 15, 2025
fd6af7f
Codacy issues.
jgfoster Jan 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ INCLUDE=-I$(ARDUINO_CI)/arduino \
HEADERS=$(wildcard src/*.h) $(wildcard src/wrappers/*) $(wildcard src/UIState/*)

.PHONY : all
all : $(BIN)/PHCalibrationWarningTest.cpp.bin $(BIN)/BlinkTest.cpp.bin $(BIN)/DateTimeTest.cpp.bin $(BIN)/EEPROMTest.cpp.bin \
$(BIN)/EnablePIDTest.cpp.bin $(BIN)/EthernetServerTest.cpp.bin $(BIN)/EthernetTest.cpp.bin \
all : $(BIN)/AlertPusherTest.cpp.bin $(BIN)/BlinkTest.cpp.bin $(BIN)/DataLoggerTest.cpp.bin \
$(BIN)/DateTimeTest.cpp.bin $(BIN)/EEPROMTest.cpp.bin $(BIN)/EnablePIDTest.cpp.bin \
$(BIN)/EthernetServerTest.cpp.bin $(BIN)/EthernetTest.cpp.bin \
$(BIN)/GetTimeTest.cpp.bin $(BIN)/JSONBuilderTest.cpp.bin $(BIN)/KeypadTest.cpp.bin \
$(BIN)/LiquidCrystalTest.cpp.bin \
$(BIN)/MenuTest.cpp.bin $(BIN)/NumberCollectorTest.cpp.bin $(BIN)/PHCalibrationHighTest.cpp.bin \
$(BIN)/PHCalibrationLowTest.cpp.bin $(BIN)/PHCalibrationMidTest.cpp.bin \
$(BIN)/PHCalibrationPromptTest.cpp.bin $(BIN)/PHControlTest.cpp.bin \
$(BIN)/PHCalibrationPromptTest.cpp.bin $(BIN)/PHCalibrationWarningTest.cpp.bin $(BIN)/PHControlTest.cpp.bin \
$(BIN)/PHProbeTest.cpp.bin $(BIN)/PIDTest.cpp.bin $(BIN)/PushingBoxTest.cpp.bin $(BIN)/SDTest.cpp.bin \
$(BIN)/SeeDeviceAddressTest.cpp.bin $(BIN)/SeeDeviceUptimeTest.cpp.bin $(BIN)/SeeFreeMemoryTest.cpp.bin \
$(BIN)/SeeGoogleMinsTest.cpp.bin $(BIN)/SeeLogFileTest.cpp.bin $(BIN)/SeePHCalibrationTest.cpp.bin \
Expand All @@ -63,19 +64,25 @@ all : $(BIN)/PHCalibrationWarningTest.cpp.bin $(BIN)/BlinkTest.cpp.bin $(BIN)/Da
$(BIN)/SetChillOrHeatTest.cpp.bin $(BIN)/SetGoogleSheetIntervalTest.cpp.bin $(BIN)/SetKDTest.cpp.bin \
$(BIN)/SetKITest.cpp.bin $(BIN)/SetKPTest.cpp.bin $(BIN)/ResetPHCalibrationTest.cpp.bin \
$(BIN)/SetPHTargetTest.cpp.bin $(BIN)/SetPHSineWaveTest.cpp.bin $(BIN)/SetTankIDTest.cpp.bin \
$(BIN)/ResetThermalCalibrationTest.cpp.bin $(BIN)/SetThermalTargetTest.cpp.bin $(BIN)/SetThermalSineWaveTest.cpp.bin \
$(BIN)/SetTimeTest.cpp.bin $(BIN)/StringsTest.cpp.bin $(BIN)/TCLibTest.cpp.bin \
$(BIN)/ThermalProbe_TCTest.cpp.bin $(BIN)/ThermalCalibrationTest.cpp.bin \
$(BIN)/ResetThermalCalibrationTest.cpp.bin $(BIN)/SetThermalTargetTest.cpp.bin \
$(BIN)/SetThermalSineWaveTest.cpp.bin $(BIN)/SetTimeTest.cpp.bin $(BIN)/StringsTest.cpp.bin \
$(BIN)/TCLibTest.cpp.bin $(BIN)/ThermalProbeTest.cpp.bin $(BIN)/ThermalCalibrationTest.cpp.bin \
$(BIN)/ThermalControlTest.cpp.bin $(BIN)

GPP_TEST=g++ $(FLAGS) -L$(BIN) $(INCLUDE)

$(BIN)/PHCalibrationWarningTest.cpp.bin: $(BIN)/libarduino.so $(TEST)/PHCalibrationWarningTest.cpp $(HEADERS)
$(GPP_TEST) -o $(BIN)/PHCalibrationWarningTest.cpp.bin $(TEST)/PHCalibrationWarningTest.cpp -larduino

$(BIN)/AlertPusherTest.cpp.bin: $(BIN)/libarduino.so $(TEST)/AlertPusherTest.cpp $(HEADERS)
$(GPP_TEST) -o $(BIN)/AlertPusherTest.cpp.bin $(TEST)/AlertPusherTest.cpp -larduino

$(BIN)/BlinkTest.cpp.bin: $(BIN)/libarduino.so $(TEST)/BlinkTest.cpp $(HEADERS)
$(GPP_TEST) -o $(BIN)/BlinkTest.cpp.bin $(TEST)/BlinkTest.cpp -larduino

$(BIN)/DataLoggerTest.cpp.bin: $(BIN)/libarduino.so $(TEST)/DataLoggerTest.cpp $(HEADERS)
$(GPP_TEST) -o $(BIN)/DataLoggerTest.cpp.bin $(TEST)/DataLoggerTest.cpp -larduino

$(BIN)/DateTimeTest.cpp.bin: $(BIN)/libarduino.so $(TEST)/DateTimeTest.cpp $(HEADERS)
$(GPP_TEST) -o $(BIN)/DateTimeTest.cpp.bin $(TEST)/DateTimeTest.cpp -larduino

Expand Down Expand Up @@ -217,8 +224,8 @@ $(BIN)/StringsTest.cpp.bin: $(BIN)/libarduino.so $(TEST)/StringsTest.cpp $(HEADE
$(BIN)/TCLibTest.cpp.bin: $(BIN)/libarduino.so $(TEST)/TCLibTest.cpp $(HEADERS)
$(GPP_TEST) -o $(BIN)/TCLibTest.cpp.bin $(TEST)/TCLibTest.cpp -larduino

$(BIN)/ThermalProbe_TCTest.cpp.bin: $(BIN)/libarduino.so $(TEST)/ThermalProbe_TCTest.cpp $(HEADERS)
$(GPP_TEST) -o $(BIN)/ThermalProbe_TCTest.cpp.bin $(TEST)/ThermalProbe_TCTest.cpp -larduino
$(BIN)/ThermalProbeTest.cpp.bin: $(BIN)/libarduino.so $(TEST)/ThermalProbeTest.cpp $(HEADERS)
$(GPP_TEST) -o $(BIN)/ThermalProbeTest.cpp.bin $(TEST)/ThermalProbeTest.cpp -larduino

$(BIN)/ThermalCalibrationTest.cpp.bin: $(BIN)/libarduino.so $(TEST)/ThermalCalibrationTest.cpp $(HEADERS)
$(GPP_TEST) -o $(BIN)/ThermalCalibrationTest.cpp.bin $(TEST)/ThermalCalibrationTest.cpp -larduino
Expand Down Expand Up @@ -248,7 +255,7 @@ SDFAT=$(BIN)/FreeStack.o $(BIN)/MinimumSerial.o $(BIN)/File_CI.o $(BIN)/SD_CI.o
$(BIN)/istream.o $(BIN)/ostream.o

OBJECTS=$(BIN)/Arduino.o $(BIN)/Godmode.o $(BIN)/stdlib.o $(BIN)/ArduinoUnitTests.o \
$(BIN)/TC_util.o $(BIN)/TankController.o $(BIN)/DataLogger.o $(BIN)/DateTime_TC.o \
$(BIN)/TC_util.o $(BIN)/TankController.o $(BIN)/AlertPusher.o $(BIN)/DataLogger.o $(BIN)/DateTime_TC.o \
$(BIN)/EEPROM_TC.o $(BIN)/EthernetServer_TC.o $(BIN)/Ethernet_TC.o $(BIN)/GetTime.o \
$(BIN)/JSONBuilder.o \
$(BIN)/Keypad_TC.o $(BIN)/LiquidCrystal_TC.o $(BIN)/PHControl.o $(BIN)/PHProbe.o \
Expand Down Expand Up @@ -288,6 +295,9 @@ $(BIN)/TC_util.o: $(SRC)/model/TC_util.cpp $(HEADERS)
$(BIN)/TankController.o: $(SRC)/TankController.cpp $(HEADERS)
g++ -c $(FLAGS) $(INCLUDE) -o $(BIN)/TankController.o $(SRC)/TankController.cpp

$(BIN)/AlertPusher.o: $(SRC)/model/AlertPusher.cpp $(HEADERS)
g++ -c $(FLAGS) $(INCLUDE) -o $(BIN)/AlertPusher.o $(SRC)/model/AlertPusher.cpp

$(BIN)/DataLogger.o: $(SRC)/model/DataLogger.cpp $(HEADERS)
g++ -c $(FLAGS) $(INCLUDE) -o $(BIN)/DataLogger.o $(SRC)/model/DataLogger.cpp

Expand All @@ -303,12 +313,12 @@ $(BIN)/EthernetServer_TC.o: $(SRC)/wrappers/EthernetServer_TC.cpp $(HEADERS)
$(BIN)/Ethernet_TC.o: $(SRC)/wrappers/Ethernet_TC.cpp $(HEADERS)
g++ -c $(FLAGS) $(INCLUDE) -o $(BIN)/Ethernet_TC.o $(SRC)/wrappers/Ethernet_TC.cpp

$(BIN)/JSONBuilder.o: $(SRC)/model/JSONBuilder.cpp $(HEADERS)
g++ -c $(FLAGS) $(INCLUDE) -o $(BIN)/JSONBuilder.o $(SRC)/model/JSONBuilder.cpp

$(BIN)/GetTime.o: $(SRC)/model/GetTime.cpp $(HEADERS)
g++ -c $(FLAGS) $(INCLUDE) -o $(BIN)/GetTime.o $(SRC)/model/GetTime.cpp

$(BIN)/JSONBuilder.o: $(SRC)/model/JSONBuilder.cpp $(HEADERS)
g++ -c $(FLAGS) $(INCLUDE) -o $(BIN)/JSONBuilder.o $(SRC)/model/JSONBuilder.cpp

$(BIN)/Keypad_TC.o: $(SRC)/wrappers/Keypad_TC.cpp $(HEADERS)
g++ -c $(FLAGS) $(INCLUDE) -o $(BIN)/Keypad_TC.o $(SRC)/wrappers/Keypad_TC.cpp

Expand Down
7 changes: 6 additions & 1 deletion examples/TankController/TankController.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
// If it remains empty, then no data will be sent.
const char pushingBoxID[] = "";

// The log file name must be unique to this device.
// It can be 28 characters maximum, and ".log" will be added.
// If it remains empty, the MAC address will be used.
const char logFileName[] = "";

// We query a web server for GMT time and then adjust for local time
const int tzOffsetHrs = -7;

Expand All @@ -26,7 +31,7 @@ void serialEvent1() { // if the hardware serial port_1 receives a char
void setup() {
// the install process is followed by a reset and we get two startups
delay(500);
tank = TankController::instance(pushingBoxID, tzOffsetHrs);
tank = TankController::instance(pushingBoxID, logFileName, tzOffsetHrs);
tank->setup();
}

Expand Down
2 changes: 1 addition & 1 deletion extras/device_client/lib/model/version.dart
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const String gitVersion = 'v24.3.2 +';
const String gitVersion = 'v24.3.2-8-g9987+';
67 changes: 42 additions & 25 deletions extras/log_file_client/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,45 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.

# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
- always_declare_return_types
- always_put_control_body_on_new_line
- always_put_required_named_parameters_first
- always_use_package_imports
- avoid_bool_literals_in_conditional_expressions
- avoid_final_parameters
- avoid_void_async
- camel_case_types
- combinators_ordering
- conditional_uri_does_not_exist
- directives_ordering
- discarded_futures
- eol_at_end_of_file
- leading_newlines_in_multiline_strings
- literal_only_boolean_expressions
- matching_super_parameters
- no_adjacent_strings_in_list
- no_literal_bool_comparisons
- no_self_assignments
- no_wildcard_variable_uses
- parameter_assignments
- prefer_final_in_for_each
- prefer_final_locals
- prefer_single_quotes
- require_trailing_commas
- sort_child_properties_last
- sort_constructors_first
- sort_pub_dependencies
- sort_unnamed_constructors_first
- throw_in_finally
- type_annotate_public_apis
- unawaited_futures
- unnecessary_await_in_return
- unnecessary_parenthesis
- unnecessary_raw_strings
- unnecessary_statements
- unreachable_from_main
- unsafe_html
- use_colored_box
- use_decorated_box
- use_enums
- use_full_hex_values_for_flutter_colors
2 changes: 1 addition & 1 deletion extras/log_file_client/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class MyApp extends StatelessWidget {
}

class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
const MyHomePage({required this.title, super.key});

// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
Expand Down
74 changes: 2 additions & 72 deletions extras/log_file_client/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,90 +1,20 @@
name: log_file_client
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 24.3.2

environment:
sdk: '>=3.3.1 <4.0.0'

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
cupertino_icons: ^1.0.6
flutter:
sdk: flutter


# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.6

dev_dependencies:
flutter_lints: ^3.0.0
flutter_test:
sdk: flutter

# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^3.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true

# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware

# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages

# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
2 changes: 1 addition & 1 deletion extras/scripts/testAndBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
cp extras/scripts/p*-commit .git/hooks/
bundle config set --local path 'vendor/bundle'
bundle install
bundle exec arduino_ci.rb --min-free-space=5696 1> >(tee stdout.txt ) 2> >(tee stderr.txt >&2 )
bundle exec arduino_ci.rb --min-free-space=5666 1> >(tee stdout.txt ) 2> >(tee stderr.txt >&2 )
result="${PIPESTATUS[0]}"
exit "$result"
9 changes: 6 additions & 3 deletions src/TankController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "UIState/MainMenu.h"
#include "UIState/UIState.h"
#include "Version.h"
#include "model/AlertPusher.h"
#include "model/DataLogger.h"
#include "model/GetTime.h"
#include "model/PHControl.h"
Expand Down Expand Up @@ -35,9 +36,9 @@ TankController *TankController::_instance = nullptr;
/**
* static function to return singleton
*/
TankController *TankController::instance(const char *pushingBoxID, int tzOffsetHrs) {
TankController *TankController::instance(const char *pushingBoxID, const char *alertFileName, int tzOffsetHrs) {
if (!_instance) {
_instance = new TankController;
_instance = new TankController(alertFileName);
PushingBox::instance(pushingBoxID);
GetTime::instance(tzOffsetHrs);
}
Expand All @@ -48,11 +49,12 @@ TankController *TankController::instance(const char *pushingBoxID, int tzOffsetH
/**
* Constructor
*/
TankController::TankController() {
TankController::TankController(const char *alertFileName) {
serial(F("\r\n#################\r\nTankController::TankController() - version %s"), TANK_CONTROLLER_VERSION);
assert(!_instance);
// ensure we have instances
SD_TC::instance();
SD_TC::instance()->setAlertFileName(alertFileName);
EEPROM_TC::instance();
Keypad_TC::instance();
LiquidCrystal_TC::instance(TANK_CONTROLLER_VERSION);
Expand Down Expand Up @@ -162,6 +164,7 @@ void TankController::loop(bool report_loop_delay) {
handleUI(); // look at keypad, update LCD (~90ms)
DataLogger::instance()->loop(); // record current data to SD and serial
GetTime::instance()->loop(); // update the time
AlertPusher::instance()->loop(); // handle requests to cloud server
PushingBox::instance()->loop(); // write data to Google Sheets (~1130ms every report)
Ethernet_TC::instance()->loop(); // renew DHCP lease
EthernetServer_TC::instance()->loop(); // handle any HTTP requests
Expand Down
5 changes: 3 additions & 2 deletions src/TankController.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class UIState;
class TankController {
public:
// class methods
static TankController* instance(const char* pushingBoxID = nullptr, int tzOffsetHrs = -7);
static TankController* instance(const char* pushingBoxID = nullptr, const char* alertFileName = nullptr,
int tzOffsetHrs = -7);

// instance methods
bool isInCalibration();
Expand Down Expand Up @@ -43,7 +44,7 @@ class TankController {
char nextKey = 0;

// instance methods
TankController();
TankController(const char* alertFileName);
~TankController();
void blink();
void handleUI();
Expand Down
2 changes: 1 addition & 1 deletion src/Version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define VERSION "v24.3.2 +"
#define VERSION "v24.3.2-8-g9987+"
Loading