Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c0c1817
Converted to use node-pi-buttons module and made pi-buttons a separat…
bnielsen1965 Mar 4, 2018
e7bb7c6
Fix for low number of BGs and offset
cluckj Jun 16, 2018
c86941e
customizations for jon's production rig
cluckj Jun 19, 2018
cb9139c
Merge pull request #8 from openaps/master
cluckj Jun 19, 2018
e8e8b56
Merge pull request #9 from cluckj/patch-2
cluckj Jun 19, 2018
6195056
various personalizations and possible improvements
cluckj Jul 14, 2018
d351559
revert screenoff code and add pump status to screen
cluckj Jul 15, 2018
966dbe7
status screen improvements and bugfixes
cluckj Jul 15, 2018
4de7a5e
Update README.md
cluckj Jul 15, 2018
a789f53
improvements, bugfixes, and exit on display malfunction
cluckj Jul 15, 2018
e2df2b4
Merge branch 'jon-dev' of https://github.com/cluckj/openaps-menu into…
cluckj Jul 15, 2018
6ee63b1
Clearer error messages
cluckj Jul 15, 2018
75bc4ac
comments
cluckj Jul 15, 2018
67fcc1f
fixing error handling when only writing to the screen once
cluckj Jul 15, 2018
3dd7e39
bugfixes
cluckj Jul 15, 2018
7c935cb
stop calling status scripts from the commandline
cluckj Jul 16, 2018
315dd9f
use socket server to control display
cluckj Jul 16, 2018
9794f54
Merge pull request #10 from bnielsen1965/node-pi-buttons
cluckj Jul 16, 2018
30e5d3b
improvements and bugfixes
cluckj Jul 16, 2018
68e13c8
status screen for cas
cluckj Jul 16, 2018
2a35a2b
nice typo
cluckj Jul 19, 2018
07ea8a9
Remove custom rig code
cluckj Jul 19, 2018
2ca742a
revert readme
cluckj Jul 19, 2018
a1fac9a
fixes and improvements
cluckj Jul 23, 2018
80875e6
Merge pull request #11 from cluckj/jon-dev
cluckj Jul 23, 2018
12b38ac
Revert "upgrade jon-dev with node pi buttons"
cluckj Jul 23, 2018
905b0de
Merge pull request #12 from cluckj/revert-10-node-pi-buttons
cluckj Jul 23, 2018
837282d
Don't crash if buttons are pressed & screen broken
cluckj Jul 24, 2018
1595979
bugfixes and add preferences toggle for status
cluckj Aug 6, 2018
769a592
Merge pull request #13 from cluckj/jon-dev
cluckj Aug 6, 2018
0fee879
more preferences, update big_bg_status.js
cluckj Aug 6, 2018
162e5a5
Merge pull request #14 from cluckj/jon-dev
cluckj Aug 6, 2018
281334e
Update README.md
cluckj Aug 6, 2018
521eeec
Update menu.json
cluckj Aug 6, 2018
06c0d51
Delete casstatus.js
cluckj Sep 25, 2018
ca7e7a0
Merge branch 'master' into master
cluckj Sep 25, 2018
7cfbc0a
Revert package.json
cluckj Sep 25, 2018
b3fecda
Remove comma
cluckj Sep 25, 2018
89372a2
Add preferences switch info
cluckj Sep 25, 2018
f0addab
Add 8am-8pm invert display option.
cluckj Sep 25, 2018
7efd198
Add 8am-8pm invert display option.
cluckj Sep 25, 2018
2995f52
Variable name bugfix
cluckj Nov 8, 2018
b3bf41a
Logic fix for day/night inversion
cluckj Nov 8, 2018
8059d33
Logic fix for day/night inversion
cluckj Nov 8, 2018
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
Prev Previous commit
Next Next commit
comments
  • Loading branch information
cluckj committed Jul 15, 2018
commit 75bc4ac024881f68d236bb93a63480c1e20eae7e
14 changes: 8 additions & 6 deletions scripts/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ try {
return console.error("Status screen display error: could not parse meal.json: ", e);
}

//Process and display battery gauge, if we can
if(batterylevel) {
//Process and display battery gauge
display.oled.drawLine(116, 57, 127, 57, 1, false); //top
display.oled.drawLine(116, 63, 127, 63, 1, false); //bottom
display.oled.drawLine(116, 57, 116, 63, 1, false); //left
Expand All @@ -113,7 +113,7 @@ clockMin = (clockMin < 10 ? "0" : "") + clockMin;
display.oled.setCursor(83, 57);
display.oled.writeString(font, 1, clockHour+":"+clockMin, 1, true, false);

//display reason for not looping and move the graph to make room for the message!
//display reason for not looping and move the graph to make room for the message and to draw attention to it!
var notLoopingReason = suggested.reason;
display.oled.setCursor(0,16);
var yOffset = 0;
Expand All @@ -130,9 +130,11 @@ else if (notLoopingReason.includes("CGM is calibrating")) {
yOffset = 3;
}
else if (notLoopingReason.includes("CGM data is unchanged")) {
display.oled.writeString(font, 1, "CGM is unchanged", 1, true, false);
display.oled.writeString(font, 1, "CGM data unchanged", 1, true, false);
yOffset = 3;
}
//add more on-screen warnings/messages here, maybe some special ones for xdrip-js users


//bg graph axes
display.oled.drawLine(5, 51+yOffset, 5, 21+yOffset, 1, false);
Expand Down Expand Up @@ -218,16 +220,16 @@ startDate = new Date(stats.mtime);
endDate = new Date();
minutes = Math.round(( (endDate.getTime() - startDate.getTime()) / 1000) / 60);

//render current temp basal
//display current temp basal
display.oled.setCursor(0,0);
var tempRate = Math.round(temp.rate*10)/10;
display.oled.writeString(font, 1, "TB: "+temp.duration+'m '+tempRate+'U/h '+'('+minutes+'m ago)', 1, false);

//parse and render COB/IOB
//display COB/IOB line
display.oled.setCursor(0,8);
display.oled.writeString(font, 1, "COB: "+cob.mealCOB+"g IOB: "+iob[0].iob+'U', 1, false, false);

//display everything in the buffer
//write to the screen
display.oled.update();

//randomly invert display to evenly wear the OLED diodes
Expand Down