The Teensy4.0 and SHC


Howard Dutton
 

Fingers crossed and I still have to test... but it looks like I've worked around the memory limitation to give the Teensy4.0 full catalogs on the SHC.

No need to use PROGMEM (with all the complexity that would create;) turns out it's easy to place variables in the second memory area and I did so for the NGC and IC catalogs:

Memory Usage on Teensy 4.1:
  FLASH: code:137380, data:320408, headers:8124   free for files:7660552
   RAM1: variables:295680, code:134328, padding:29512   free for local variables:64768
   RAM2: variables:202144  free for malloc/new:322144


Howard Dutton
 

Sorry compiled for the T4.1 (working on the Observatory Control System and that's been the target for a while.)

T4.0 is more or less the same, just less flash (but still plenty):

Memory Usage on Teensy 4.0:
  FLASH: code:136220, data:320152, headers:8520   free for files:1566724
   RAM1: variables:295680, code:134136, padding:29704   free for local variables:64768
   RAM2: variables:202144  free for malloc/new:322144


Howard Dutton
 

I did some basic testing and things looked ok, so the main branch SHC has the update now.

Lots of refactoring, switched to new libraries, better naming of methods, that fix for full catalogs on T4.0, etc.


Drew 🔭📷🚴‍♂️
 

Do you have any thoughts about the truncated 3rd line problem in the catalogs display? Here is an example: http://i.imgur.com/PVb7q9o.png

I am sure it is just a font size issue, but I have zero experience with the U8g2 library.


Khalid Baheyeldin
 

On Wed, Oct 13, 2021 at 09:20 AM, Drew 🔭📷🚴‍♂️ wrote:
truncated 3rd line problem in the catalogs display
Seconded ...

I have been seeing this regularly with the new versions of the SHC.


Dave Schwartz
 

Setting ST4_AUX_INTERFACE ON results in the following error:

Arduino: 1.8.16 (Windows 10), Board: "Node32s, No OTA (Large APP), 80MHz, 921600, None"

In file included from C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:4:

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.h:9:10: fatal error: ../../buttons/PushButton.h: No such file or directory

 #include "../../buttons/PushButton.h"

          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1

Error compiling for board Node32s.


Dave Schwartz
 

And when I change the include to #include "../../lib/pushButton/PushButton.h" so the file is found, lots of other errors result:

Arduino: 1.8.16 (Windows 10), Board: "Node32s, No OTA (Large APP), 80MHz, 921600, None"

In file included from C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:4:

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.h:15:5: error: 'button' does not name a type; did you mean 'Button'?

     button *n, *s, *e, *w;

     ^~~~~~

     Button

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp: In member function 'void AuxST4::setup()':

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:11:3: error: 'n' was not declared in this scope

   n = new Button(ST4_AUX_N_PIN, INPUT_PULLUP, LOW | HYST(debounceMs));

   ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:11:3: note: suggested alternative: 'yn'

   n = new Button(ST4_AUX_N_PIN, INPUT_PULLUP, LOW | HYST(debounceMs));

   ^

   yn

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:12:3: error: 's' was not declared in this scope

   s = new Button(ST4_AUX_S_PIN, INPUT_PULLUP, LOW | HYST(debounceMs));

   ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:12:3: note: suggested alternative: 'sq'

   s = new Button(ST4_AUX_S_PIN, INPUT_PULLUP, LOW | HYST(debounceMs));

   ^

   sq

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:13:3: error: 'e' was not declared in this scope

   e = new Button(ST4_AUX_E_PIN, INPUT_PULLUP, LOW | HYST(debounceMs));

   ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:14:3: error: 'w' was not declared in this scope

   w = new Button(ST4_AUX_W_PIN, INPUT_PULLUP, LOW | HYST(debounceMs));

   ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp: In member function 'void AuxST4::poll()':

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:22:3: error: 'n' was not declared in this scope

   n.poll();

   ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:22:3: note: suggested alternative: 'yn'

   n.poll();

   ^

   yn

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:23:3: error: 's' was not declared in this scope

   s.poll();

   ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:23:3: note: suggested alternative: 'sq'

   s.poll();

   ^

   sq

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:24:3: error: 'e' was not declared in this scope

   e.poll();

   ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:25:3: error: 'w' was not declared in this scope

   w.poll();

   ^

In file included from C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:6:

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.h:15:5: error: 'button' does not name a type; did you mean 'Button'?

     button *n, *s, *e, *w;

     ^~~~~~

     Button

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp: In member function 'void UI::update()':

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:240:55: error: 'class AuxST4' has no member named 'e'

       if (!moveEast  && (keyPad.e->isDown() || auxST4.e->isDown())) { moveEast = true; SERIAL_ONSTEP.write(ccMe); buttonCommand = true; } else

                                                       ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:241:55: error: 'class AuxST4' has no member named 'e'

       if ( moveEast  && (keyPad.e->isUp()   && auxST4.e->isUp()))   { moveEast = false; SERIAL_ONSTEP.write(ccQe); buttonCommand = true; keyPad.e->clearPress(); auxST4.e->clearPress(); }

                                                       ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:241:170: error: 'class AuxST4' has no member named 'e'

       if ( moveEast  && (keyPad.e->isUp()   && auxST4.e->isUp()))   { moveEast = false; SERIAL_ONSTEP.write(ccQe); buttonCommand = true; keyPad.e->clearPress(); auxST4.e->clearPress(); }

^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:242:55: error: 'class AuxST4' has no member named 'w'

       if (!moveWest  && (keyPad.w->isDown() || auxST4.w->isDown())) { moveWest = true; SERIAL_ONSTEP.write(ccMw); buttonCommand = true; } else

                                                       ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:243:55: error: 'class AuxST4' has no member named 'w'

       if ( moveWest  && (keyPad.w->isUp()   && auxST4.w->isUp()))   { moveWest = false; SERIAL_ONSTEP.write(ccQw); buttonCommand = true; keyPad.w->clearPress(); auxST4.w->clearPress(); }

                                                       ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:243:170: error: 'class AuxST4' has no member named 'w'

       if ( moveWest  && (keyPad.w->isUp()   && auxST4.w->isUp()))   { moveWest = false; SERIAL_ONSTEP.write(ccQw); buttonCommand = true; keyPad.w->clearPress(); auxST4.w->clearPress(); }

^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:244:55: error: 'class AuxST4' has no member named 'n'

       if (!moveNorth && (keyPad.n->isDown() || auxST4.n->isDown())) { moveNorth = true; SERIAL_ONSTEP.write(ccMn); buttonCommand = true; } else

                                                       ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:245:55: error: 'class AuxST4' has no member named 'n'

       if ( moveNorth && (keyPad.n->isUp()   && auxST4.n->isUp()))   { moveNorth = false; SERIAL_ONSTEP.write(ccQn); buttonCommand = true; keyPad.n->clearPress(); auxST4.n->clearPress(); }

                                                       ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:245:170: error: 'class AuxST4' has no member named 'n'

       if ( moveNorth && (keyPad.n->isUp()   && auxST4.n->isUp()))   { moveNorth = false; SERIAL_ONSTEP.write(ccQn); buttonCommand = true; keyPad.n->clearPress(); auxST4.n->clearPress(); }

^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:246:55: error: 'class AuxST4' has no member named 's'

       if (!moveSouth && (keyPad.s->isDown() || auxST4.s->isDown())) { moveSouth = true; SERIAL_ONSTEP.write(ccMs); buttonCommand = true; } else

                                                       ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:247:55: error: 'class AuxST4' has no member named 's'

       if ( moveSouth && (keyPad.s->isUp()   && auxST4.s->isUp()))   { moveSouth = false; SERIAL_ONSTEP.write(ccQs); buttonCommand = true; keyPad.s->clearPress(); auxST4.s->clearPress(); }

                                                       ^

C:\Users\schwa\Documents\Arduino\SmartHandController\src\userInterface\UserInterface.cpp:247:170: error: 'class AuxST4' has no member named 's'

       if ( moveSouth && (keyPad.s->isUp()   && auxST4.s->isUp()))   { moveSouth = false; SERIAL_ONSTEP.write(ccQs); buttonCommand = true; keyPad.s->clearPress(); auxST4.s->clearPress(); }

^

exit status 1

Error compiling for board Node32s.

On 2021-10-13 11:42 a.m., Dave Schwartz via groups.io wrote:
Setting ST4_AUX_INTERFACE ON results in the following error:

Arduino: 1.8.16 (Windows 10), Board: "Node32s, No OTA (Large APP), 80MHz, 921600, None"

In file included from C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.cpp:4:

C:\Users\schwa\Documents\Arduino\SmartHandController\src\libApp\st4Aux\St4Aux.h:9:10: fatal error: ../../buttons/PushButton.h: No such file or directory

 #include "../../buttons/PushButton.h"

          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1

Error compiling for board Node32s.
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Drew 🔭📷🚴‍♂️
 

On Wed, Oct 13, 2021 at 11:42 AM, Khalid Baheyeldin wrote:
I have been seeing this regularly with the new versions of the SHC.
Khalid, Do you know of an old version that does not do this? I can't find one in my archive.


Khalid Baheyeldin
 

Try the addon that comes as part of OnStep 4.x.
I think that was the one that displayed correctly.


Drew 🔭📷🚴‍♂️
 

On Wed, Oct 13, 2021 at 12:22 PM, Khalid Baheyeldin wrote:
Try the addon that comes as part of OnStep 4.x.
No luck. If there was a specific version that worked, I have not found it. Tried the oldest and newest versions of 4.x that I have.


Khalid Baheyeldin
 

How about the 3.16 addon?
I am sure something was working before I went to the standalone github SHC.


Drew 🔭📷🚴‍♂️
 

On Wed, Oct 13, 2021 at 01:41 PM, Khalid Baheyeldin wrote:
I am sure something was working before I went to the standalone github SHC.
Went back to v1.5b of the SHC code, about July, 2019. All the same, if there was working code I cannot find it.


Khalid Baheyeldin
 

Maybe it is the u8g2 library version then?

Ken,
You had it working with no chopped off third line.
Can you tell us which OnStep/SHC version and u8g2 lib?


Drew 🔭📷🚴‍♂️
 

On Wed, Oct 13, 2021 at 05:29 PM, Khalid Baheyeldin wrote:
Maybe it is the u8g2 library version then?
All of this was with v2.28.10 of the Oliver library.


Khalid Baheyeldin
 

On Wed, Oct 13, 2021 at 05:47 PM, Drew 🔭📷🚴‍♂️ wrote:
All of this was with v2.28.10
Same version I have for u8g2.

Dave? Which one do you have, and do you see the 3rd line catalog issue?


Dave Schwartz
 

2.28.10 and yes I do. The third line cutoff is easy to see on the Goto, Deep Shy, Messier list... M6, 7 and 8.

On 2021-10-13 6:19 p.m., Khalid Baheyeldin wrote:
On Wed, Oct 13, 2021 at 05:47 PM, Drew 🔭📷🚴‍♂️ wrote:

All of this was with v2.28.10

Same version I have for u8g2.

Dave? Which one do you have, and do you see the 3rd line catalog issue?
--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


Howard Dutton
 

Note I did briefly test a Teensy4.1 with the new full catalog SHC code this morning.

I didn't really check for the 3rd line problem, but I did briefly browse the catalogs and didn't notice any issues (SSD1309.)
I didn't even really do the test for the large catalogs! Lol.

I was checking to see if the darn SHC code I have here still works after those unified /lib folder changes....

BTW my ESP32 SHC micro-usb port is broken so no testing on it.
And my "bench test" Teensy3.2 controller is broken too, bad display (dropped one too many times.)

Fortunately I still had an 2.4" screen SHC user Jerry sent me (thx again) and I used that; and I still have two other T3.2 based ones with the 1.3" screen also.


Howard Dutton
 

I have U8G2 version 2.8.10 installed also.


Howard Dutton
 

I found the fix I put in place to get large catalogs on the T4.0 and 4.1 didn't work. But I also found another way around it that does work, a simple thing that just leaves everything in flash.  So this issue is closed.

The SHC also got an update this morning, it now has/uses the latest library code; a nice little update that paves the way for future improvements.  I've already switched to several newer libraries and cleaned up/organized some of the SHC code.

Couldn't reproduce the 3rd line problem (again this is the SSD1309 screen.)  I'll try a SH1106 soon though.


Drew 🔭📷🚴‍♂️
 
Edited

On Sun, Oct 17, 2021 at 10:16 AM, Howard Dutton wrote:
Couldn't reproduce the 3rd line problem (again this is the SSD1309 screen.)  I'll try a SH1106 soon though.
That is interesting that it may be the SH1106 only. I wonder if it happens on the 0.96" SH1306?

I am sure you are looking at the right screens? The
STF** star page always has the problem.