Skip to content

Commit

Permalink
Merge pull request #11 from ncmreynolds/dev
Browse files Browse the repository at this point in the history
Fix #10 had only been tested on ESP32
  • Loading branch information
ncmreynolds authored Jul 25, 2024
2 parents c84dc91 + b8f5deb commit c2e1d4c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
5 changes: 5 additions & 0 deletions documentation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## Version 0.1.5

- Bugfixes
- Fix compilation error on AVR, had only been tested on ESP32.

## Version 0.1.4

- New methods
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=retroTerm
version=0.1.4
version=0.1.5
author=Nick Reynolds,nick+retroTerm@arcanium.london
maintainer=Nick Reynolds,nick+retroTerm@arcanium.london
sentence=A library for creating GUI-esque interfaces in a terminal emulator with a microcontroller.
Expand Down
14 changes: 6 additions & 8 deletions src/retroTerm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ void retroTerm::_displayChanges()
else if(_widgets[widgetIndex].type == _widgetTypes::textLog)
{
saveCursorPosition(); //Save current cursor state
hideCursor(); //Hide the cursor to reduce flickery movement in the terminal
//hideCursor(); //Hide the cursor to reduce flickery movement in the terminal
if(_scrollbarNeeded(widgetIndex))
{
_drawScrollbar(_widgets[widgetIndex].x, _widgets[widgetIndex].y, _widgets[widgetIndex].w, _widgets[widgetIndex].h, (_widgets[widgetIndex].label != nullptr) && (_widgets[widgetIndex].style & LABEL_IN_BOX), _widgets[widgetIndex].contentOffset, uint32_t(_contentSize(widgetIndex)), _widgets[widgetIndex].attributes, _widgets[widgetIndex].style);
Expand Down Expand Up @@ -2743,22 +2743,20 @@ uint8_t retroTerm::lines()
return(_lines);
}
#if defined(ESP8266) || defined(ESP32)
uint8_t ICACHE_FLASH_ATTR retroTerm::setColumns(uint8_t columns)
void ICACHE_FLASH_ATTR retroTerm::setColumns(uint8_t columns)
#else
uint8_t retroTerm::setColumns()
void retroTerm::setColumns(uint8_t columns)
#endif
{
_columns = columns;
return(_columns);
}
#if defined(ESP8266) || defined(ESP32)
uint8_t ICACHE_FLASH_ATTR retroTerm::setLines(uint8_t lines)
void ICACHE_FLASH_ATTR retroTerm::setLines(uint8_t lines)
#else
uint8_t retroTerm::setLines()
void retroTerm::setLines(uint8_t lines)
#endif
{
_lines = lines;
return(_lines);
}

#if defined(ESP8266) || defined(ESP32)
Expand Down Expand Up @@ -2906,7 +2904,7 @@ void retroTerm::restoreCursorPosition()
_currentAttributes = _savedAttributes;
_cursorX = _savedCursorX;
_cursorY = _savedCursorY;
//_cursorVisible = _savedCursorState;
_cursorVisible = _savedCursorState;
if(_savedCursorState) //The terminal does not save the visibiity of the cursor correctly
{
showCursor();
Expand Down
4 changes: 2 additions & 2 deletions src/retroTerm.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ class retroTerm
bool probeSize(); //Tries to set the width/length of the terminal by probing, this can take up to 1s
uint8_t columns(); //Returns the current number of columns, use after calling probeSize()
uint8_t lines(); //Returns the current number of lines, use after calling probeSize()
uint8_t setColumns(uint8_t columns);//Sets the current number of columns, use instead of calling probeSize()
uint8_t setLines(uint8_t lines); //Sets the current number of lines, use instead of calling probeSize()
void setColumns(uint8_t columns); //Sets the current number of columns, use instead of calling probeSize()
void setLines(uint8_t lines); //Sets the current number of lines, use instead of calling probeSize()
bool probeType(); //Tries to probe the terminal type, mostly for information, this can take up to 3s. May not be useful!
char* type(); //Returns the terminal type

Expand Down

0 comments on commit c2e1d4c

Please sign in to comment.