Conversation
|
I'm also experimenting (not in this patch set) with just blitting the whole image in one big base64 string. This is significantly faster again (I'm getting more than 10fps over MQTT to the swagbadge). In the experimental version, I send: |
|
were there issues with this? it seemed like a good idea |
|
Marc, I've replaced this with a version which I think has a cleaner API (and is significantly faster, I didn't realized early on that the speed bottleneck was the parsing). The new one just sends the entire image as a single blob, rather than line by line. |
Andy - these are the changes I made to oled.py to allow for the oled:blit0 and oled:blit1 functions - I must confess I don't really know how to Python.
The blit arguments are base64 encoded strings, one string per line, and it is blitted starting at the top left corner of the chosen screen.
example usage
(oled:blit1 ////////+ ////9v//+ ////ff//+ ///9////+ ///3/9//+ ////////+ ////r///+ ///5+9//+ ////3r//+ ////33//+ ///+i///+ ///z/X//+ ///f/9//+ //+6qvf/+ //7ASBv/+ //3Cqp3/+ //uVVQ7/+ //2FVUd/+ //cEqo//+ //eKpUq/+ //6GvUe/+ /+eHnqq/+ //4Pt0f/+ /++Fs6e/+ //cMVk2/+ //eFV0f/+ //2FUK5/+ //uCrqf/+ //2KoU7/+ //7JWq3/+ //9kpFv/+ //++t+f/+ ///H/RP/+ //+0hdX/+ //8v/yr/+ //6l/9V/+ //6vbar/+ //yv79I/+ //qtfdW/+ //pf7tSf+ //q3e+lf+ //K933Vf+ //S3deiv+ /+q/v3av+ //Tt7fVP+ /+p/f7Fv+ /+Vq1c0v+ /+k//uVf+ /+qu95VP+ /+qnv9E3+ /xUr9VSn+ /qqpv1a3+ /VVX/1VP+ /qqS11Vj+ /qqr/yqV+ /qqje6rV+ /qqq3FVX+ /VVVRqqn+ /VqpUlVf+ /1VVKVV/+ //VV/1T/+ //1X/9X/+ ///f/6f/+ ////////+)To do the screen capture, I just used some dirty C++ code https://pastebin.com/cyPbdUNF to snapshot, reduce down and dither, and ran it from a script which called mosquitto_pub to periodically publish the capture.