-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QuickGLUI and apps #163
QuickGLUI and apps #163
Conversation
FX rates app fully completed Example app restored (was commited by mistake)
Great work! And a heavy update! Is it possible for you to create documentation? Like the following code fragment from blectl.h.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some files you use ps_mallac, to future versions it would be better to use hardware/alloc.h. It makes easier to change memory allocation method when it is necessary.
#include "hardware/alloc.h"
MALLOC( ... )
I'm afraid what it will be hard to write full documentation in one moment. Also I want to belive what community may help with that :) Regarding ps_mallac - OK. In developer section on my-ttgo-watch.co.uk was said what ps_mallac prefered to use, so I decide use it :) But in same time during development I tried to avoid dynamic memory allocation and used it only where it's really needed. For example, Widgets use ps_mallac only in the case of external event handlers binding. |
I've started reviewing the changes too |
Documentation added |
I can't get the IR Controller configured. It behaves ok with no configuration though, just showing the exit button. |
|
||
#include "lvgl/lvgl.h" | ||
#include "../widgets/widget.h" | ||
#include "../widgets/widget.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"../widgets/widget.h" is included twice
return true; | ||
} | ||
|
||
String JsonRequest::fromatCompletedAt(const char* format) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo "fromat" should be "format"
@datacute Thank you for feedback about issues in code, I'm fixing it now.
That's Ok because you have not configured buttons yet. There isn't any added by default buttons currently . So you should add them depends on your devices. May be I should add something by default to make it more clear?
It's definitely looks like a bug. In my case, problems do not happen often, but they do happen sometimes (much better than WiFi FileManager in my case but still not very good). Reload help always in such cases. Mostly I'm face issues when workig with long RAW IR codes. I'm planning to review bluetooth stack implementation and may be will find and fix issues reason than.
You should enter button name in the left text field before click Add button. May be it isn't clear - I think I should update WConfigurator app also, what do you think? |
Thanks for the code. I committed fixes for the minor issues. |
I'm wondering whether you can enhance the ftp server and json app configuration capabilities so that when a new config file is ftp'd over, I don't need to reset the watch for the app to pick up the changes? |
I've succeeded in turning on my Sony TV, but need to be able to specify the number of bits to send... |
I think it isn't correct direction, instead of that we should resolve problems with WConfivurator connection or add functionality to my-ttgo-watch.co.uk (or both). I'm afraid what your issue anyway related to clock Bluetooth code, not external app functionality. |
Very interesting. Can we calculate required amount of bits automatically somehow (from the IR code)? If not we should add additional parameter for Sony devices, I think. |
so apologies in advance if this is the wrong place for this, but im looking for a little more clarity on how to use quickGLUI. im working on an app to connect to a 3d printer (#164 ), and since it is similar to the others, i simply copied your fx_rates app and renamed everything. but im not sure i understand how its actually working. i see how the variables get displayed to the widget, but i dont understand how they get set. here is what i have/where things diverge, maybe someone can help me understand how the fetch__data bit works. or just more directly how to open up a telnet/websocket/raw connection of whatever sort, on 192.168.1.215, port 8888, and send 4 characters, the response should just be displayed directly. im sorry again if this is a basic question, all the examples ive found are either for the esp to be the server, or sending data to a server for storage/logging. |
QuickGLUI can't provide solutions for telnet/websocket/raw connection for now. Currently only HTTP JSON request was implemented and also it has just very basic functionality. Main benefit of using QuickGLUI - significant simplify of the application interface and app settings page development. So as I understood your task, I think here it can be helpful. From my opinion, to implement 3d printer control application you will need to find and modify printer communication code, after that you can integrate it to the app without issues and relatively quickly. |
ahh ok, i think i understand now. will play with it, i dont think ill need to modify anything on the printer end, if i can implement something basic that will execute inside that same fetch_x_data function (and it might have json support im not sure still). connect->send command->store response to be displayed later. at the moment i dont think this is going to be so much a 'control' program so much as a monitor, since there is a webUI that can be used from phone/tablet etc, but users could add additional commands i suppose. on a slightly unrelated note (or rather back to the previous topic): what is the intended method for acquiring IR codes? i used a random receiver module and an arduino nano with an example sketch IRrecieverDemo to capture the codes from my emerson remote, which gave me hex values like 0xDF20E084. after putting them into wconfigurator (set nec, hex, etc) they dont match what was entered, and the nano reads them with 'parity error' or something, im assuming i have something formatted wrong. dunno if there was a particular receiver sketch that should be used but i figgured id ask since wconfigurator is... well for me its unreliable. most of the time i click and it just spins, when i do go through and make changes and click save they are usually lost |
Features
Goals
Many parts of different apps currently are really very same (web requests and synchronisation, standard app buttons, configuration and so on). Goal of the QuickGLUI library — provide high level abstraction layer which will allow to write new applications very quickly without big knowledge (and easier for the beginners). But in same time it keep flexibility for non-standard cases (user always can overwrite default behavior if needed).
For comparsion, two applications with alsmost same functionality (syncronization, widget support, HTTP request and JSON parsing):
(~7 times smaller)
Also, it's much easier to write and understand the code using QuickGLUI abstraction layer. This should allow beginners start clock application development quickly:
https://github.com/anakod/My-TTGO-Watch/blob/quickglue/src/app/fx_rates/fx_rates.cpp#L70
https://github.com/sharandac/My-TTGO-Watch/blob/master/src/app/crypto_ticker/crypto_ticker_main.cpp#L64