Best posts made by kl3m3n
-
RE: Unable to enter Device IP or UEL
@SteveV Hi!
You mean you cannot enter IP address due to not having any period ('.') character available?
This is not normal. Can you try changing the keyboard from Android settings and see if the issue persists?
I am "forcing" the number keyboard when user touches the IP field... In most cases, the keyboard also shows other characters. Anyway, I will fix this ASAP - I have a release lined up right now. I will probably take a day or two...
Best regards,
Klemen -
RE: ESP8266 & Arduino & GUI-O automatic pairing
@Bernard Yes, you have wrong credentials. This is what's causing the problem. You have changed the settings somehow...
I advise you to clear application data or uninstall and reinstall the application. This will reset the settings to default. Alternatively, you could input the correct settings, but I recommend reinstall... It will be easier for you. Then retry pairing.
Note that you must keep the default settings if you want to connect to GUI-O server!
Best regards,
kl3m3n
Latest posts made by kl3m3n
-
RE: Some issues and possible improvements
@enniom said in Some issues and possible improvements:
@kl3m3n thanks for looking into this issue.
Yes, each page has "remnants" - more specifically it is generally those defined - for example - at position X:90 W:20 or X:10 W:20. In the case of this application, the goal was to squeeze 4-6 charts per page and put them at the left or right page boundary so that the image and real-time data can be shown in the center.
Secondly, the widgets at these positions may not be fully shown in the page they are defined. To be more clear, in this case they are fully shown in the Tablet view but may be cut off slightly at the left or right in the Galaxy view.
Enniom
Hi,
GUI-O version 1.0.89 is being released. Additionally to the chart labels fix, this version introduces a new parameter: widgets bounding (WBE, which can be enabled / disabled via @guis WBE: command - it is disabled by default. Please see the updated manual).
Enabling this ensures the widget is never off-screen as GUI-O application internally moves the widgets in-view. This can be useful when developing for various screen sizes. Note that the widgets' sizes remain the same, only the position is updated. So, if your widgets are too close together, they might overlap.
You can try this approach on your tablet and phone.
Best regards,
Kl3m3n -
RE: Some issues and possible improvements
@enniom Hi.
XY chart does not support time on X axis... You can use index-based approach.
But, I would suggest that you synchronize the data using time chart. I argue that it does not matter if you send the same value multiple times.
For example, if you have three variables / values... On initialization, set all three values based on your measurements. Then send each new measured value along with two "old" values (they are actually not old, they just haven't been re-measured yet) in the same message.
This is how you synchronize the data and keep the time chart while still maintaining valid values.
Does this make sense?
Best regards,
Kl3m3n -
RE: Some issues and possible improvements
@enniom Hi.
Generally, time chart updates should occur at predefined (fixed) interval to avoid synchronization issues. New values should be added in one operation to maintain temporal alignment. I will add this note to the manual!
If you need asynchronous plotting, switch to XY chart type. I think that should work without "flashing".
Best regards,
Kl3m3n -
RE: Some issues and possible improvements
@enniom Thanks, I can see this "flashing".
Since you are using the time chart, you should send all the data points simultaneously in one message, so that the drawing of data points is synchronized.
A simple example:
@ch1 PLI:"id0,id1" PLC:"#ff0000,#0000ff" XP:"0.0,0.0" YP:"10.3,20.4"Can you try this and see if the issue persists?
Meanwhile, I will fix the labels showing only partially...
Best regards,
Kl3mn3 -
RE: Some issues and possible improvements
@enniom Hi.
Ok, I see now. The labels are not entirely visible.
Can you try setting the YASC:1 and see if the issue persists?
BR,
Kl3m3n -
RE: Some issues and possible improvements
@enniom Hi.
I tried your example, but I am unable to see the issue? Can you please explain what does "flash" of the SHVL:1 values mean? You are talking about the values on the Y axis and the last value?
Best regards,
Kl3m3n -
RE: Some issues and possible improvements
@enniom Thanks for the minimal example, I will try it.
Best regards,
Kl3m3n -
RE: Issue on sending Widget on init
@mathieu Hi!
I have sent the initialization code to your e-mail (I have included your full commands there, but not here on the forum).
Basically, the commands are sent in a non-blocking fashion one-by one:
#include <BLEDevice.h> #include <BLEServer.h> #include <BLEUtils.h> #include <BLE2902.h> #include <pgmspace.h> const char* const commands[] PROGMEM = { "|LB UID:lb0 X:20 Y:10\r\n", ... ... ... }; const size_t numCommands = sizeof(commands) / sizeof(commands[0]); namespace uuid { static const char *SERVICE_UUID = "6E400001-B5A3-F393-E0A9-E50E24DCCA9E"; static const char *RX_CHARACTERISTIC_UUID = "6E400002-B5A3-F393-E0A9-E50E24DCCA9E"; static const char *TX_CHARACTERISTIC_UUID = "6E400003-B5A3-F393-E0A9-E50E24DCCA9E"; } // namespace uuid // forward declare parser for incoming messages void parseGuioMsg(const String &msg); // setup done flag bool setupDone = false; // init active flag bool initActive = false; // send command period in msec static const unsigned long sendCommandPeriod = 50; // custom handling of server callbacks class CustomBLEServerCallbacks: public BLEServerCallbacks { void onConnect(BLEServer* pServer) { Serial.println("Connected!"); }; void onDisconnect(BLEServer* pServer) { Serial.println("Disconnected!"); // fix provided by BM // restart advertising after disconnect, otherwise GUI-O cannot re-connect if(setupDone) { // restart advertising on disconnect delay(500); pServer->startAdvertising(); } } }; // custom handling of characteristic callbacks class CustomBLECharacteristicCallbacks: public BLECharacteristicCallbacks { void onWrite(BLECharacteristic *pCharacteristic) { std::string msg = pCharacteristic->getValue(); // parse message string parseGuioMsg(String(msg.c_str())); } }; // global ptr BLECharacteristic *pTxCharacteristic; void setup() { // debug output Serial.begin(115200); // create device BLEDevice::init("BasicBLE_NUS"); // create server and register callback BLEServer *pServer = BLEDevice::createServer(); pServer->setCallbacks(new CustomBLEServerCallbacks()); // create service BLEService *pService = pServer->createService(uuid::SERVICE_UUID); // crate Tx characteristic and add descriptor pTxCharacteristic = pService->createCharacteristic(uuid::TX_CHARACTERISTIC_UUID, BLECharacteristic::PROPERTY_NOTIFY); pTxCharacteristic->addDescriptor(new BLE2902()); // crate Rx characteristic and register callback BLECharacteristic *pRxCharacteristic = pService->createCharacteristic(uuid::RX_CHARACTERISTIC_UUID, BLECharacteristic::PROPERTY_WRITE | BLECharacteristic::PROPERTY_WRITE_NR); pRxCharacteristic->setCallbacks(new CustomBLECharacteristicCallbacks()); // start the service and start advertising pService->start(); pServer->getAdvertising()->start(); // setup done flag setupDone = true; } void loop() { static size_t currentCommandIndex = 0; static unsigned long lastCommandTime = 0; if (initActive) { if (currentCommandIndex < numCommands) { if (millis() - lastCommandTime > sendCommandPeriod) { lastCommandTime = millis(); // retrieve and send the command char commandBuffer[256]; strcpy_P(commandBuffer, (char*)pgm_read_ptr(&commands[currentCommandIndex])); sendMsg(commandBuffer); Serial.print("Sending: "); Serial.println(commandBuffer); currentCommandIndex++; } } else { initActive = false; // hide loading screen sendMsg("@hls\r\n"); } } } /***************************/ /* IMPLEMENT YOUR GUI HERE */ /***************************/ void sendMsg(const String &msg) { pTxCharacteristic->setValue(std::string(msg.c_str())); pTxCharacteristic->notify(); delay(50); } void parseGuioMsg(const String &msg) { if(msg.startsWith("@init")) { Serial.println("GUI-O app is requesting INITIALIZATION!"); // clear screen and set background sendMsg("@cls\r\n"); sendMsg("@guis BGC:#FFFFFF\r\n"); sendMsg("|SORI UID:sori2 HID:sori ORI:2 SEN:0\r\n"); // wait for orientation change (alternatively catch GUI-O screen orientation change event...) delay(500); // show loading screen sendMsg("@sls\r\n"); initActive = true; } }
Can you please test it and see if it works for you?
You can try extending sendCommandPeriod if you have any issues... Also you can comment out the @sls and @hls commands to see exactly what is going on...
Best regards,
Kl3m3n -
RE: Some issues and possible improvements
@enniom No problem
Thank you for the feedback. I will notify you when I solve the issue regarding the widgets on different screens.
Best regards,
Kl3m3n