Post Reply 
Time and Battery Indicators
10-25-2017, 02:47 AM
Post: #6
RE: Time and Battery Indicators
(10-24-2017 09:31 AM)webmasterpdx Wrote:  You can get them by looking at the pixels set in the graphics and store them in global variables and then redraw them using the values gleaned. Look at the battery value I mentioned in a previous post on this thread.

Thanks, yeah I saw the previous example of obtaining the battery level by pixels, however for my purposes it isn't really suitable. At first what I did was simply "paint over" the default header and not touch the battery & time graphic area, which is probably fine for short use, but the application I'm working on could potentially be run for extended periods (hours) without exiting. I would have to periodically call a dummy command for a brief fraction of a second that would repaint the default header to update the information to make it current, which is what I wanted to avoid. The 50g had annunciator display commands that I was thinking of, different scope for those of course since they were not part of the main display area, completely different logic for modes too, etc.

This falls into the "nice to have" category but certainly not critical, but I still think it would be handy to have commands that would just draw over top of whatever is on G0 the desired info in the header area.

FYI, in case anyone is interested, this is what I used to draw over top of the default header:
Code:
  // IF B→R(Theme(1))==1 THEN
  //   LINE_P(G0,0,1,270,1,RGB(41,99,165));
  //   LINE_P(G0,0,2,270,2,RGB(41,90,156));
  //   RECT_P(G0,0,3,270,6,RGB(41,82,148));
  //   RECT_P(G0,0,7,270,10,RGB(41,82,156));
  //   RECT_P(G0,0,11,270,13,RGB(33,90,165));
  //   RECT_P(G0,0,14,270,15,RGB(33,90,173));
  //   LINE_P(G0,0,16,270,16,RGB(33,90,181));
  // ELSE
  //   RECT_P(G0,0,1,270,6,RGB(57,57,57));
  //   RECT_P(G0,0,7,270,9,RGB(66,66,66));
  //   RECT_P(G0,0,10,270,11,RGB(74,74,74));
  //   RECT_P(G0,0,12,270,14,RGB(82,82,82));
  //   LINE_P(G0,0,15,270,15,RGB(90,90,90));
  //   LINE_P(G0,0,16,270,16,RGB(107,107,107));
  // END;
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Time and Battery Indicators - Jacob Wall - 10-22-2017, 09:30 PM
RE: Time and Battery Indicators - Jacob Wall - 10-25-2017 02:47 AM



User(s) browsing this thread: 2 Guest(s)