These are chat archives for SmingHub/Sming

17th
Feb 2016
alonewolfx2
@alonewolfx2
Feb 17 2016 07:03
Blynk need many work
Especially it need rewrite client and WiFi class
Can anyone help me for porting this blynk library
Alex Gray
@mralexgray
Feb 17 2016 08:02
hey i'm having a hard time comprehending delegates... is it possible to use them to call objects' functions as your timer callbacks, etc?
like, I want o create an LED "object", and attach a timer to each instance... but be able to access each instance's variables within its timer routine, and the like..
Alexander V. Ribchansky
@avr39-ripe
Feb 17 2016 08:09
@mralexgray you create class method without void someClass::method(void) and then attaches it as this->sometimerVar.initializeMs(cycle_duration, TimerDelegate(&someClass::method, this)).start(true); and inside someClass::method you can access to someClass members per instance of someClass.. is it clear or I misunderstood your question?
@mralexgray you must create some variable of type Timer in your someClass and then in some method of someClass attach timer as I wrote above
hreintke
@hreintke
Feb 17 2016 10:47
@mralexgray :
Just made a PR for Delegate example #606
If no comments are coming for that will commit into develop branch
Alexander V. Ribchansky
@avr39-ripe
Feb 17 2016 11:24
@hreintke looks nice! Simple as it should be :)
alon24
@alon24
Feb 17 2016 13:41
@hreintke how do i use interupts now?
I do not think it works in rtos
@hreintke can u give an example?
hreintke
@hreintke
Feb 17 2016 15:25

@alon24 : @harry-boe
I added a Basic_Interrupts example in RTOS to show the working.
The issues before with the basic_interrupts in NONOS and RTOS are caused by a wrong conversion from "Arduino interrupt types" (LOW, CHANGE, RISING,....) to the "ESP Interrupts"

typedef enum {
    GPIO_PIN_INTR_DISABLE = 0,      /**< disable GPIO interrupt */
    GPIO_PIN_INTR_POSEDGE = 1,      /**< GPIO interrupt type : rising edge */
    GPIO_PIN_INTR_NEGEDGE = 2,      /**< GPIO interrupt type : falling edge */
    GPIO_PIN_INTR_ANYEDGE = 3,      /**< GPIO interrupt type : bothe rising and falling edge */
    GPIO_PIN_INTR_LOLEVEL = 4,      /**< GPIO interrupt type : low level */
    GPIO_PIN_INTR_HILEVEL = 5       /**< GPIO interrupt type : high level */
} GPIO_INT_TYPE;

Please use the ESP values like I did in the example (GPIO_INT_TYPE)GPIO_PIN_INTR_ANYEDGE including the typecast.
Will check how to fix the Arduino->ESP conversion.

alon24
@alon24
Feb 17 2016 15:32
@hreintke yes that works ok
thanks
now infoscreens works again with rtos
alon24
@alon24
Feb 17 2016 15:38
can anyone help me with rboot, i want 2 roms on my 4mb esp, 1m for app and 1 for spiff X2 (so I can do ota)
I realy never figured it out on my knows
own
(this is for sousvide)
now in rtos
Georgi Dobrishinov
@dobrishinov
Feb 17 2016 17:00
Guys, do you have issues with AJAX sample in Sming, i want to use ajax method for show temperature in real time, but i have issues with HEAP, after one or two minutes HEAP is go away and Connection closed
alon24
@alon24
Feb 17 2016 17:21
Use websockets
hreintke
@hreintke
Feb 17 2016 17:51
@dobrishinov : See httpserver_ajax example
hreintke
@hreintke
Feb 17 2016 18:01
@alon24 :
What issues do you have with rboot ?
The easiest is the 2 roms/2 spiff/4mb. I think it is almost the default setting.
alon24
@alon24
Feb 17 2016 18:01
I need 1mb for app, its big
I do not know what is needed exactly to do in sming, since I just did it once and forgot
hreintke
@hreintke
Feb 17 2016 18:03
for 4mg it is
  • first mb -> app1
  • second mb -> spiffs
  • third -> app2
  • fourth -> spiffs2
alon24
@alon24
Feb 17 2016 18:03
Need to know what to put in appploicatiin, make file and ld file
hreintke
@hreintke
Feb 17 2016 18:04
The basic_rboot example settings are for this config
alon24
@alon24
Feb 17 2016 18:30
1m for app?
alon24
@alon24
Feb 17 2016 18:49
I will try to get the settings from sample
Georgi Dobrishinov
@dobrishinov
Feb 17 2016 18:56
@hreintke my issues is on httpserver_ajax example : )
hreintke
@hreintke
Feb 17 2016 19:18
@alon24 :
yes 1Mb, that is the maximum possible
Option settings :
## use rboot build mode
RBOOT_ENABLED ?= 1
## enable big flash support (for multiple roms, each in separate 1mb block of flash)
RBOOT_BIG_FLASH ?= 1
## size of the flash chip
SPI_SIZE        ?= 4M
## size of the spiffs to create
SPIFF_SIZE      ?= 65536
## (spiffs location defaults to the mb after the rom slot on 4mb flash)
hreintke
@hreintke
Feb 17 2016 19:24
The rom0.ld file from basic_rboot is the correct one for these settings
alon24
@alon24
Feb 17 2016 19:24
And I will copy the application. Cpp code too
hreintke
@hreintke
Feb 17 2016 19:27
make sure you take the rtos one. It is updated for the changed working of spiffs_mount_manual
alon24
@alon24
Feb 17 2016 19:39
Yes
Jaroslav Vacha
@rosiste
Feb 17 2016 22:00
@avr39-ripe Great and thanks. Will test and report. ;-)
alainmaes
@alainmaes
Feb 17 2016 22:52
@hreintke Is the rtos version yet stable enough for production grade applications?