Skip to content

Support for ST7567 LCD I2C display driver #310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 62 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
d349d91
Fix problem of transitions getting faster with each call of setTargetFPS
geeksville Feb 21, 2020
9fdc276
Allow this library to work on other Arduinos (NRF52) besides ESPs
geeksville Apr 15, 2020
6ac546f
Merge remote-tracking branch 'root/master'
geeksville Apr 15, 2020
6a56151
Let users specify -1 for scl/sda to mean 'use current value'
geeksville Apr 23, 2020
0c83c42
fix missing dependency, std::max is defined in algorithm
geeksville Apr 27, 2020
dc278d1
Treat SH1106 controller the same as SSD1306
mrvdb Jun 14, 2020
72cc15c
Merge pull request #1 from mrvdb/ssh1106-support
geeksville Jun 16, 2020
a2f3e97
make sh1106 displays work on NRF52
geeksville Jul 10, 2020
3e5ae1f
Super ugly early version of a ST7567 LCD driver
geeksville Oct 23, 2020
b49120f
add basic contrast support for the LCD
geeksville Oct 24, 2020
26cffc6
fix what appears to be a bug in the configurable distance between UI …
crossan007 Feb 23, 2021
0c2ce75
add more information to the OLEDDisplayUiState about the transition
crossan007 Feb 23, 2021
35d7962
Merge pull request #2 from crossan007/master
geeksville Feb 23, 2021
8452c5a
add frame notification bounceyness
crossan007 Feb 26, 2021
0d82862
tweaks for debugging?
crossan007 Feb 26, 2021
20f3912
use std::vector instead of junky arrays
crossan007 Feb 27, 2021
29a9070
mostly working panel notifications
crossan007 Feb 27, 2021
4e724c4
fix header
crossan007 Feb 27, 2021
641e533
Cleanup the frame notification API so we're not passing ugly pointers
crossan007 Mar 2, 2021
d7f2174
prevent adding a notification to the currently active frame
crossan007 Mar 2, 2021
183c857
Nicely working callback to inform of currently active screen
crossan007 Mar 2, 2021
22c7eef
return -1 in getFirstNotifyingFrame if there are no notifications
crossan007 Mar 2, 2021
a589780
Merge pull request #3 from crossan007/adjust_frame_notifications
geeksville Mar 3, 2021
a17c51a
Merge branch 'master' of https://github.com/ThingPulse/esp8266-oled-s…
mc-hamster Dec 26, 2021
6545196
Merge branch 'ThingPulse-master' into update-from-head
mc-hamster Dec 26, 2021
881f880
Fix typo /Drawen/Drawn/
mc-hamster Dec 26, 2021
e5a09a2
update /Drawn/Drawen/
mc-hamster Dec 26, 2021
0bfaf5c
update Drawen to Drawn
mc-hamster Dec 26, 2021
bc1c277
More drawen to drawn
mc-hamster Dec 26, 2021
03c0015
Merge pull request #5 from meshtastic/update-from-head
mc-hamster Dec 26, 2021
ec1dbfb
Factor actual fontdata out to a cpp file so the font won't get embedd…
caveman99 Jan 21, 2022
c408e77
Merge pull request #6 from caveman99/master
mkinney Jan 24, 2022
b2f1e30
adding library for caveman99
mkinney Jan 24, 2022
da0f7fa
Merge pull request #7 from mkinney/add_lib_for_caveman
mkinney Jan 24, 2022
ad02dfd
Another Tryfix for Github CI
caveman99 Jan 24, 2022
2d32bf3
Update OLEDDisplayUi.h
caveman99 Jan 24, 2022
d90231d
Merge pull request #8 from caveman99/master
mkinney Jan 24, 2022
2d6bd3e
Helper for Autodetect Code
caveman99 Mar 24, 2022
9f92094
Merge branch 'ThingPulse:master' into master
caveman99 Mar 24, 2022
5358064
Merge branch 'ThingPulse:master' into master
mc-hamster Apr 11, 2022
6dccbab
Merge branch 'ThingPulse:master' into master
caveman99 Jan 18, 2023
bedfa09
add support for SH1107 variant on 128x128
caveman99 Jan 18, 2023
da1ede4
shift for auto detect too
caveman99 Jan 18, 2023
b38094e
Test: SH1107 Fix
caveman99 Mar 8, 2023
4cc4caa
fixed name collision for keyword NONE
dizcza Oct 8, 2023
37637e6
Enable selection of I2C wire interface on Pico RP2040 platform.
Mictronics Jan 18, 2024
a4031c8
Typo fixed.
Mictronics Jan 18, 2024
ee628ee
Merge pull request #10 from Mictronics/master
thebentern Jan 18, 2024
1143247
Merge pull request #11 from ThingPulse/master
caveman99 Mar 18, 2024
7304da2
Move SetGeometry to public space
caveman99 Mar 18, 2024
2d30270
Merge pull request #12 from meshtastic/caveman99-smallscreen
caveman99 Mar 18, 2024
1800ad5
Merge branch 'ThingPulse:master' into master
caveman99 Apr 15, 2024
b6ca371
Always break on newline character
thebentern Jun 13, 2024
69ba98f
Merge pull request #13 from meshtastic/newline
thebentern Jun 13, 2024
54b872e
Restore log buffer: revert upstream changes
todd-herbert Jun 17, 2024
7581753
Leave the GitHub runner alone
todd-herbert Jun 17, 2024
dcacac5
Merge pull request #14 from todd-herbert/master
caveman99 Jun 17, 2024
2b40aff
speed up code when autodetected too.
caveman99 Jun 18, 2024
9d393fe
Merge pull request #9 from dizcza/master
jp-bennett Jun 24, 2024
e16cee1
Make the FrameCallback a std::function to make lambdas easier
jp-bennett Jun 24, 2024
3e9fce8
Fix wrong I2C number detection for ESP32C6 target (#16)
alexbegoon Jan 3, 2025
0119501
fix sh1107 on nrf52 (#18)
caveman99 Apr 3, 2025
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
use std::vector instead of junky arrays
  • Loading branch information
crossan007 committed Feb 27, 2021
commit 20f391205208f90c5f646ccdba186c8e686d720a
45 changes: 15 additions & 30 deletions src/OLEDDisplayUi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ OLEDDisplayUi::OLEDDisplayUi(OLEDDisplay *display) {
state.isIndicatorDrawen = true;
state.manuelControll = false;
state.userData = NULL;
state.notifyingFrames = nullptr;
state.notifyingFrameCount = 0;
shouldDrawIndicators = true;
autoTransition = true;
setTimePerFrame(5000);
Expand Down Expand Up @@ -224,17 +222,9 @@ void OLEDDisplayUi::transitionToFrame(uint8_t frame) {
this->state.frameTransitionDirection = frame < this->state.currentFrame ? -1 : 1;
}

void OLEDDisplayUi::setFrameNotifications(uint8_t* notifyingFrames, uint8_t notifyingFrameCount) {
Serial.printf("SCREEN: Notifying frame count: ------ %d\n", notifyingFrameCount);
Serial.printf("SCREEN: Notifying frame 0: ------ %d\n", (notifyingFrames[0]));
Serial.printf("SCREEN: Notifying frame 1: ------ %d\n", (notifyingFrames[1]));
Serial.printf("SCREEN: Notifying frame old state ------ %d\n", this->state.notifyingFrames);
void OLEDDisplayUi::setFrameNotifications(std::vector<uint32_t> notifyingFrames) {
this->state.notifyingFrames = notifyingFrames;
this->state.notifyingFrameCount = notifyingFrameCount;
Serial.printf("SCREEN: Notifying frame new state ------ %d\n", this->state.notifyingFrames);
Serial.printf("SCREEN: Notifying frame 0: ------ %d\n", (this->state.notifyingFrames[0]));
Serial.printf("SCREEN: Notifying frame 1: ------ %d\n", (this->state.notifyingFrames[1]));
}
}


// -/----- State information -----\-
Expand Down Expand Up @@ -477,24 +467,19 @@ void OLEDDisplayUi::drawIndicator() {
image = this->inactiveSymbol;
}

display->clear();
display->drawString(0,15,"NOTFRMS: " +String(this->state.notifyingFrameCount));
Serial.printf("SCREEN: Notifying frame new state ------ %d\n", this->state.notifyingFrames);
Serial.printf("SCREEN: Notifying frame 0: ------ %d\n", (this->state.notifyingFrames[0]));
Serial.printf("SCREEN: Notifying frame 1: ------ %d\n", (this->state.notifyingFrames[1]));
for(uint8_t q=0;q<this->state.notifyingFrameCount;q++) {
Serial.printf("SCREEN: Eval;uating Notification frame %d: ------ %d\n", q,(this->state.notifyingFrames[q]));
// if the symbol for the frame we're currently drawing (i)
// is equal to the symbol in the array we're looking at (notff[q])
// then we should adjust `y` by the SIN function (actualOffset)
if (i == (this->state.notifyingFrames[0])) {
#define MILISECONDS_PER_BUBBLE_BOUNDS 5000

uint8_t actualOffset = abs((sin(this->state.ticks*PI/(MILISECONDS_PER_BUBBLE_BOUNDS/updateInterval)) * notifyingFrameOffsetAmplitude));
// is the indicator (symbol / dot) we're currently drawing one that's requesting notification
y = y - actualOffset;
//display->drawString(0,0,String(actualOffset));
//display->drawString(0,30,String(this->state.ticks));
if (this->state.notifyingFrames.size() > 0) {
for(uint8_t q=0;q<this->state.notifyingFrames.size();q++) {
// if the symbol for the frame we're currently drawing (i)
// is equal to the symbol in the array we're looking at (notff[q])
// then we should adjust `y` by the SIN function (actualOffset)
if (i == (this->state.notifyingFrames[q])) {
#define MILISECONDS_PER_BUBBLE_BOUNDS 5000
uint8_t actualOffset = abs((sin(this->state.ticks*PI/(MILISECONDS_PER_BUBBLE_BOUNDS/updateInterval)) * notifyingFrameOffsetAmplitude));
// is the indicator (symbol / dot) we're currently drawing one that's requesting notification
y = y - actualOffset;
//display->drawString(0,0,String(actualOffset));
//display->drawString(0,30,String(this->state.ticks));
}
}
}

Expand Down
5 changes: 2 additions & 3 deletions src/OLEDDisplayUi.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ struct OLEDDisplayUiState {
uint8_t transitionFrameTarget;
TransitionRelationship transitionFrameRelationship;

uint8_t* notifyingFrames;
uint8_t notifyingFrameCount;
std::vector<uint32_t> notifyingFrames;
bool isIndicatorDrawen;

// Normal = 1, Inverse = -1;
Expand Down Expand Up @@ -272,7 +271,7 @@ class OLEDDisplayUi {
/**
* Set which frames have active notificatoins
*/
void setFrameNotifications(uint8_t* notifyingFrames, uint8_t notifyingFrameCount);
void setFrameNotifications(std::vector<uint32_t> notifyingFrames);


// Frame settings
Expand Down