These are chat archives for SmingHub/Sming

Mar 2016
Mar 27 2016 14:33

Basic_NFC example & RFID_MFRC522 Library added into the smingRTOS repo

Mar 27 2016 16:29

@/all :
I added two classes to SmingRTOS which are using the underlying FreeRTOS functionality.

  • QueuedDelegate , Used as QueuedDelegate<yourType>
    It creates a queue and a task. By using the sendQueue method you can divert processing to a separate task

  • QueuedInterrupt. Is a derived class from QueuedDelegate.
    It provides an interface in which a "pin interrupt" is forwarded using a queue/task to a delegate.
    The delegate is not processed within the ISR -> no limitations on timing/function usage
    The delegate is processed in a separate task

I added the samples Basic_Queue and Basic_QueuedInterrupt to show the functionality.

Patrick Jahns
Mar 27 2016 16:31
:thumbsup: - very nice things happening in SMING
Mar 27 2016 17:14
So what would be a good thing to offload? Is there a locking
Mar 27 2016 17:20
Sounds great .. :thumbsup:
Mar 27 2016 18:18

Nextion HMI Display library and example added into the smingRTOS

Mar 27 2016 18:36
@alon24 :
It is up to the application what can/needs to be offloaded.
It is offloading and the QueuedDelegate is not executed in the calling function.
There is no locking implemented. Each QueuedDelegate instance has its own queue and task.
This task takes the queued delegates in a serial way.
Mar 27 2016 19:02
I think I will try it for the screen update task
Mar 27 2016 19:10
Probably a good choice and nice to see the first use besides myself.
Let me know if there are questions/issues/problems.
Mar 27 2016 19:20
I will,
Mar 27 2016 19:54

@alon24 :
I think I saw you use anonymous/lambda functions in your sousvide.
Made me do some experiments. Can do things like :

                            debugf("This a timer message");}
public :
    LedBlinker(int reqPin) : ledPin(reqPin) {
        pinMode(ledPin, OUTPUT);
                                [](){debugf("class function test");}


Mar 27 2016 20:06
I did not know this code predigma before, so was not me
Could the new queue delegate be used for websockets
And thus take the load of main thread?
Off of main thread
What I am thinking of using it is for I foscreens, I yardage screen every x Mills, so do that I it's own thread
I update screen