Skip to content

Commit aeb5fcd

Browse files
Brent WilkinsBrent Wilkins
authored andcommitted
Made c string parameter const to allow passing of string literal w/o warnings. Removed trailing whitespace
1 parent 3a0425e commit aeb5fcd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/SevSeg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void SevSeg::SetBrightness(byte percentBright)
186186
//Each digit is displayed for ~2000us, and cycles through the 4 digits
187187
//After running through the 4 numbers, the display is turned off
188188
//Will turn the display on for a given amount of time - this helps control brightness
189-
void SevSeg::DisplayString(char* toDisplay, byte DecAposColon)
189+
void SevSeg::DisplayString(const char* toDisplay, byte DecAposColon)
190190
{
191191
//For the purpose of this code, digit = 1 is the left most digit, digit = 4 is the right most digit
192192
for(byte digit = 1 ; digit < (numberOfDigits+1) ; digit++)

src/SevSeg.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
// framePeriod controls the length of time between display refreshes
2121
// It's also closely linked to the brightness setting
22-
#define FRAMEPERIOD 2000
22+
#define FRAMEPERIOD 2000
2323
//Total amount of time (in microseconds) for the display frame. 1,000us is roughly 1000Hz update rate
2424
//A framePeriod of:
2525
//5000 is flickery
@@ -168,8 +168,8 @@ class SevSeg {
168168
SevSeg();
169169

170170
//Public Functions
171-
void DisplayString(char*, byte);
172-
// void NewNumber(int number_in, byte DecPlace_in);
171+
void DisplayString(const char*, byte);
172+
// void NewNumber(int number_in, byte DecPlace_in);
173173
void Begin(boolean mode_in, byte numOfDigits, byte digit1, byte digit2, byte digit3, byte digit4, byte segment1, byte segment2, byte segment3, byte segment4, byte segment5, byte segment6, byte segment7, byte segmentDP);
174174
void Begin(boolean mode_in, byte numOfDigits, byte digit1, byte digit2, byte digit3, byte digit4, byte digitColon, byte digitApostrophe, byte segment1, byte segment2, byte segment3, byte segment4, byte segment5, byte segment6, byte segment7, byte segmentDP, byte segmentColon, byte segmentApostrophe);
175175
void SetBrightness(byte percentBright);
@@ -187,9 +187,9 @@ class SevSeg {
187187
byte digit1, digit2, digit3, digit4;
188188
byte digitApostrophe, digitColon, segmentApostrophe, segmentColon;
189189
byte segmentA, segmentB, segmentC, segmentD, segmentE, segmentF, segmentG, segmentDP;
190-
190+
191191
byte numberOfDigits;
192-
192+
193193
unsigned int brightnessDelay;
194194

195195
byte DigitPins[4];

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy