m4mmon / pbterm-tests Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.