thorrak / tiltbridge

Tilt Hydrometer to WiFi Bridge
http://www.tiltbridge.com/
Other
61 stars 27 forks source link

Unable to rotate/invert OLED display #199

Closed jakemastera closed 2 years ago

jakemastera commented 2 years ago

I recently flashed TiltBridge - v1.0.2 - OLED and when selecting the checkbox for "Invert TFT Display" under Settings>General Settings nothing on the TiltBridge changes. Power cycling the device from the webpage and pulling power both don't force a fix. Any ideas?

thorrak commented 2 years ago

The OLED screen is not a TFT display, so "invert" doesn't do anything. I'll take a look to see if the OLED library might have an analogous function, but I don't recall there being one.

lbussy commented 2 years ago

Try re-flashing and check the "erase" option and see if that helps allow it to save.

lbussy commented 2 years ago

Or, what John said. :)

jakemastera commented 2 years ago

The OLED screen is not a TFT display, so "invert" doesn't do anything. I'll take a look to see if the OLED library might have an analogous function, but I don't recall there being one.

I thought that might be it, I did try a few other firmware versions but they all had the same issue - thanks for the reply!

jakemastera commented 2 years ago

Try re-flashing and check the "erase" option and see if that helps allow it to save.

I did try that with a few different firmware versions that were available through BrewFlasher but they all seemed to have the same effect.

thorrak commented 2 years ago

Upon investigating, as I expected the code to actually do something with the "Invert TFT" option checked is only enabled for the TFT-style displays.

There IS an analogue in the OLED library, however:

// Turn the display upside down
void flipScreenVertically();

I don't have Tilts, an OLED tiltbridge, or an environment that is set up to compile the project at the moment, so I can't get this added for a bit, but I'll track it here and try to slip it into a future release.

jakemastera commented 2 years ago

Upon investigating, as I expected the code to actually do something with the "Invert TFT" option checked is only enabled for the TFT-style displays.

There IS an analogue in the OLED library, however:

// Turn the display upside down
void flipScreenVertically();

I don't have Tilts, an OLED tiltbridge, or an environment that is set up to compile the project at the moment, so I can't get this added for a bit, but I'll track it here and try to slip it into a future release.

thanks for working on that so quickly! no worries, I ended up just flipping the housing that I mounted to the wall for now.

lbussy commented 2 years ago

I may have left one out of the shipping boxes. I will look when I get home.

lbussy commented 2 years ago

Well, as you likely suspected @thorrak, this is going to be a little more work than just adding that. New libs, updated core, new fun!

thorrak commented 2 years ago

Well, as you likely suspected @thorrak, this is going to be a little more work than just adding that. New libs, updated core, new fun!

Is it? I'm surprised - I was actually expecting it to be ~a few lines (at least for the SSD1306 screens) but requiring a new semaphore to track status. You honestly would get 80% of the way there by just adding a check for invertTFT to this line - but you'd have to restart the TiltBridge every time you changed invertTFT

lbussy commented 2 years ago

I do not have the libraries downloaded that we compiled with last time. New libraries will not compile cleanly, and I like the patience today to mess with it.

Guess which library threw the most errors?

thorrak commented 2 years ago

LCBUrl?

lbussy commented 2 years ago

No, our favorite one.

thorrak commented 2 years ago

Well, I just got rid of that library in favor of one that you maintain, so... sorry @lbussy.

I was poking through a box earlier this afternoon and stumbled across an OLED board that I left here from last year. That said, I got this feature built, added, and tested on my end, so it should go in to the next release.

@jakemastera - I'm working on getting a beta version out there as v1.0.3 shortly if you want to test it. Keep an eye on BrewFlasher/Fermentrack (or whatever you use to flash your firmware)

jakemastera commented 2 years ago

Well, I just got rid of that library in favor of one that you maintain, so... sorry @lbussy.

I was poking through a box earlier this afternoon and stumbled across an OLED board that I left here from last year. That said, I got this feature built, added, and tested on my end, so it should go in to the next release.

@jakemastera - I'm working on getting a beta version out there as v1.0.3 shortly if you want to test it. Keep an eye on BrewFlasher/Fermentrack (or whatever you use to flash your firmware)

Damn, you're fast! I'll keep an eye out for sure, thanks!

thorrak commented 2 years ago

Well, I just got rid of that library in favor of one that you maintain, so... sorry @lbussy. I was poking through a box earlier this afternoon and stumbled across an OLED board that I left here from last year. That said, I got this feature built, added, and tested on my end, so it should go in to the next release. @jakemastera - I'm working on getting a beta version out there as v1.0.3 shortly if you want to test it. Keep an eye on BrewFlasher/Fermentrack (or whatever you use to flash your firmware)

Damn, you're fast! I'll keep an eye out for sure, thanks!

Hah, as are you! This should now be available as v1.0.3-Beta (for whichever flavor of board you have)

jakemastera commented 2 years ago

Well, I just got rid of that library in favor of one that you maintain, so... sorry @lbussy. I was poking through a box earlier this afternoon and stumbled across an OLED board that I left here from last year. That said, I got this feature built, added, and tested on my end, so it should go in to the next release. @jakemastera - I'm working on getting a beta version out there as v1.0.3 shortly if you want to test it. Keep an eye on BrewFlasher/Fermentrack (or whatever you use to flash your firmware)

Damn, you're fast! I'll keep an eye out for sure, thanks!

Hah, as are you! This should now be available as v1.0.3-Beta (for whichever flavor of board you have)

tested this morning and it worked perfectly, thanks for the quick response!

thorrak commented 2 years ago

Awesome, thank you! Feel free to keep using the v1.0.3 "beta" as long as you like - If you find anything else broken, report it back as a new issue. I'll leave this issue open until the fix gets merged into a released version - hopefully soon.