Skip to content

m4mmon/pbterm-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Small modifications for FW6 PB SDK and some cosmetic fixes. I actually tested that on: - PB840 (de-branded Tea InkPad2) with firmware 5.20.706, - PB631 (de-branded Tea Touch HD) with firmware 5.20.1527, - PB632 (PocketBook Touch HD3) with firmware 6.1.900. Here I detail the small modifications that have been made to pbterm. The only notable ones are the fix for 5+ firmwares and the status bar offset, and the other is the ANSI escape sequences code filtering for getting a clean output on the screen. In addition to pbterm original installation instructions (in README.pbterm file): you should use a better font than the default system one, by 1/ using a monospace font, copy the file on the device in system/fonts 2/ and declaring it, in pbterm.cfg ("font_name" key). For example: SourceCodePro-Regular.otf has been copied to system/fonts, then in pbterm.cfg, one should have: font_name : "SourceCodePro-Regular.otf" By default, OpenFont will try to open the indicated font from the provided value, if it fails, it will try with "ttf" then "TTF" extensions. If still not found, it will silently fall back to the system font, even if the returned object is set with the name provided in the first place... I have somehow "fixed" inkview.hpp by upgrading some definitions and tried my best to keep it as it is for compatibility with older devices, but it could not work with "recent" inkview.h and I had to comment out a type definition. If it is needed, one would have to uncomment it. src/Button_Handler.cpp There I upgraded the constants for key press values. src/Config.cpp Here I added a routine for getting a boolean value from config file. I used it for a flag allowing to filter out ANSI escape sequence codes in Term.cpp. src/Display.cpp I added a call to SetPanelType in order to avoid the status bar to "offset" the screen, which was leading to a bug where the last few lines at the bottom of the screen would actually be drawn at the top (inkview bug or feature???). src/Menu_Handler.cpp Here I removed some compilation warnings. More notably there was a char* comparison which I found very suspect and replaced with a call to strcmp. src/Messenger.cpp Here use GetTouchInfoI instead of GetTouchInfo. While it was perfectly fine, the function does not exist anymore on 6 firmware. src/Pointer_Handler.cpp Updated the code to use GetTouchInfoI. src/Submenu.cpp Removed a warning src/Term.cpp Exploited the "filter" flag from Config.cpp in order to remove ANSI escape sequences. If enabled, the output from ls or similar commands will not appear on the screen. In first instance, I wanted to to it only in "Line" class, and still write original output (if recording was enabled), but I was too lazy to pass the config object in the constructor, and did the filtering directly when getting shell output here. src/Utils.cpp Added the function that removes the ANSI escape sequences from a string, using a regular expression I found on stackexchange or similar but have not been able to retrieve to credit its author. 

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages