Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VizBlocksFramework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Design Informatics
VizBlocks
VizBlocksFramework
Commits
a7ce4c0c
Commit
a7ce4c0c
authored
4 years ago
by
emorgan
Browse files
Options
Downloads
Patches
Plain Diff
remove battery module reset as doesn't work with hardware
parent
ccce8325
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/VizBlocks.cpp
+1
-18
1 addition, 18 deletions
src/VizBlocks.cpp
src/VizBlocks.h
+0
-4
0 additions, 4 deletions
src/VizBlocks.h
with
1 addition
and
22 deletions
src/VizBlocks.cpp
+
1
−
18
View file @
a7ce4c0c
...
...
@@ -127,23 +127,6 @@ void VizBlock::run()
int
loop_start_time
=
millis
();
serial_command
();
// The battery charging and power module will switch off automatically unless a certain amount of
// current is drawn. We can keep it on by regularly trigerring a reset input.
_rst_time
=
millis
();
if
(
_rst_time
-
_last_rst_time
>
20000
){
digitalWrite
(
D0
,
LOW
);
if
(
!
_resetting
)
{
_resetting
=
true
;
_rst_start_time
=
_rst_time
;
}
if
(
_rst_time
-
_rst_start_time
>
300
)
{
digitalWrite
(
D0
,
HIGH
);
_resetting
=
false
;
_last_rst_time
=
millis
();
}
}
if
(
_wifi
)
{
wifi_connect
();
...
...
@@ -204,8 +187,8 @@ void VizBlock::init()
Serial
.
println
(
F
(
"VizBlock Node starting up"
));
Serial
.
println
(
"Initialising "
+
String
(
_id
));
pinMode
(
D4
,
OUTPUT
);
pinMode
(
D0
,
OUTPUT
);
digitalWrite
(
D4
,
LOW
);
WiFi
.
mode
(
WIFI_STA
);
WiFi
.
setSleepMode
(
WIFI_NONE_SLEEP
);
...
...
This diff is collapsed.
Click to expand it.
src/VizBlocks.h
+
0
−
4
View file @
a7ce4c0c
...
...
@@ -44,10 +44,6 @@ class VizBlock
unsigned
long
_previous_flashMillis
=
0
;
const
long
_flash_interval
=
1000
;
// flash every second when wifi and MQTT are connected
unsigned
long
_rst_time
;
unsigned
long
_last_rst_time
;
unsigned
long
_rst_start_time
;
bool
_resetting
=
false
;
Adafruit_MQTT_Client
*
_mqtt
;
Adafruit_MQTT_Subscribe
*
_device_subscription
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment