Skip to content

Commit

Permalink
Release 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkahn committed Oct 11, 2020
1 parent 3c2bb6f commit 05d8221
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 59 deletions.
24 changes: 14 additions & 10 deletions consolestatus.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,22 +212,26 @@ def ShowStatus(self, ign): # todo portrait, no MQTT case
hw.screen.blit(header, (10, 60))
for nd, ndinfo in Nodes.items():
try:
statinfo = Nodes[nd]['stats']['System']
if statinfo['maincyclecnt'] == 'unknown*':
stat = ndinfo['status']
qmax = ' '
else:
stat = '{} cyc'.format(statinfo['maincyclecnt']) if ndinfo['status'] in (
'idle', 'active') else ndinfo['status']
qmax = '{:4.2f} '.format(statinfo['queuetimemax24'])
active = '*' if ndinfo['status'] == 'active' else ' '
if ndinfo['status'] in ('dead', 'unknown'):
estat = ''
cstat = "{:14.14s}".format(' ')
stat = ndinfo['status']
qmax = ' '
else:
estat = ' ' if ndinfo['error'] == -1 else '?' if ndinfo['error'] == -1 else '*'
cstat = " {:>15.15s}".format(status_interval_str(ndinfo['uptime']))

statinfo = Nodes[nd]['stats']['System']
if statinfo['maincyclecnt'] == 'unknown*':
stat = ndinfo['status']
qmax = ' '
else:
stat = '{} cyc'.format(statinfo['maincyclecnt']) if ndinfo['status'] in (
'idle', 'active') else ndinfo['status']
qmax = '{:4.2f} '.format(statinfo['queuetimemax24'])

active = '*' if ndinfo['status'] == 'active' else ' '

if ndinfo['boottime'] == 0:
bt = "{:^19.19}".format('unknown')
else:
Expand All @@ -246,7 +250,7 @@ def ShowStatus(self, ign): # todo portrait, no MQTT case
hw.screen.blit(ln, (20, linestart))
linestart += int(ht * 1.2)
except Exception as E:
logsupport.Logs.Log('Error displaying node status for {} Exc: {}'.format(nd, E),
logsupport.Logs.Log('Error displaying node status for {} Exc: {} Data: {}'.format(nd, E, ndinfo),
severity=logsupport.ConsoleWarning)

displayupdate.updatedisplay()
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion docs/currentchanges.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ Minor release for some bug fixes and small improvements:
Adds pause/resume to Octoprint screen

V3.7
This release primarily adds support for soft rotation of the display that is required for the Pi4, at least when used with the 7" Pi display. Pi 4 display drivers don't use the frame buffer in the same way as previous models so they may not honor rotations set at the system level. This results in the native desktop displaying in one orientation but the console displaying in another. The useage notes explain how to set the screen type to use soft rotation and the installation scripts now add support for this. (Note this has been tested with the Pi 7", the 28c PiTFT, and the 35r PiTFT screens at this point but should work generally.)
This release primarily adds support for soft rotation of the display that is required for the Pi4, at least when used with the 7" Pi display. Pi 4 display drivers don't use the frame buffer in the same way as previous models so they may not honor rotations set at the system level. This results in the native desktop displaying in one orientation but the console displaying in another. The useage notes explain how to set the screen type to use soft rotation and the installation scripts now add support for this. (Note this has been tested with the Pi 7", the 28c PiTFT, and the 35r PiTFT screens at this point but should work generally.) This provides general purpose flexibilty to arrange the console screen orientation as you like easily (and since it is set at console start changing the orientation is also very straightforward).

The console install scripts have been streamlined in this release to avoid the second reboot that used to be required. This should somewhat speed up installation although the bulk of the time is still in updating the base system to current.

The release also fixes a bug when an alert screen gets invoked while in Maintenance mode, a bug in MQTT status handling. It also reworks Home Assistant restart code to insure that states are correct for changes that happened while the console was offline. Finally it again adjusts the use of Adafruit install script use to handle their changes related to a 28c PiTFT.
46 changes: 0 additions & 46 deletions docs/finishinstall.sh

This file was deleted.

2 changes: 1 addition & 1 deletion docs/useagenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Playing with this test should give a basic idea of the operation when many scree
The basic command structure of the console is based on screens. The program allows a main sequence of screens within which you can move forward and back via the navigation keys at the bottom of the screen. The program also allows the definition of a secondary chain of screens. Finally, a key on a screen can be defined to take you to another screen. This allows trees of screens rooted in a screen on one of the chains. Screens that are reached via a GoTo key will have "Home" and "Back" navigation keys at the bottom. The Back key returns to the screen you came from which the Home key either returns to the screen on the chain if you are multiple screens deep in a tree, or the general console home screen if you are only one level below the chain. (Without this difference the Home and Back keys would be equivalent on a screen one level below a chain screen.)

You can move between the main and secondary chains via 3 quick taps. The reason for the 2 chains is that I have found that for any console instance it is likely to be convenient for have a few screens that get frequently accessed. However, you may want to have many more, e.g., to include ones that control all other parts of your house. It is annoying if these are in the main chain since you then would have to click through them all the time. One of the screens on the main chain is designated home and this is the screen that the console will return to on its own if left idle for a timeout period. The console also defines "cover" or idle screens which appear when the console has been idle for a while. If more than one is defined the console will sequence through these screens based on timers. Think of these as "covering" the home screen; they allow easy display of things like time or weather (or eventually perhaps other information). These are passive screens when displayed with no navigation keys. Touching them simply reverts the console to the home screen. As a side note 5 taps will take you to a maintenance screen that allows some administrative operations.
## Definitions for supported screens and touch
## Definitions and Orientation for supported screens and touch
There are two files that provide some ability to configure the console to operate with the various touchscreens that are available. They are found in the directory from which the console is executing (generally consolestable). In the event that you need to modify them you may put a file of the same name in the Console directory and it will override or add to those that come with the release.

The first of these files in screendefinitons and defines the name of supported screens (e.g., 35r) and contain define the frame buffer location, driver, and dimming mechanism for the screen. The screen type can be found in the file ~pi/.Screentype. The entry in this file is of the form:
Expand Down
3 changes: 2 additions & 1 deletion getinstallinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,11 @@ def noscreen(scr):
# todo automate a fix?
if screentype == '28c':
print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
print(" NOTE!!! ")
print(" NOTE!!! NOTE!!! NOTE!!!")
print(" If you are using the 28c screen, the settings from Adafruit that")
print(" sets up are likely wrong. Look at /boot/config.txt")
print(" Next to last line should be: dtoverlay=pitft28-capacitive,rotate=180")
print(" It may well show as rotate=90 after install due to bugs in their scripts")
print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
time.sleep(10)
time.sleep(3)

0 comments on commit 05d8221

Please sign in to comment.