Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Ivan Grokhotkov
@igrr
then a CooperativeThread would simply have a condition inside and do a wait_for on it, just like all other users
i.e. ClientContext would also have a condition and use it to control the flow of connect, read, write methods
Does what I say make sense?
Baruch Even
@baruch
I need to think about it
So far I added a g_cur_cont which is used by all uses of g_cont and will allow to set it externally by the thread code before switching to its own thread. This will allow everything to work, but will simply be blocking inside the thread.
What you suggest seems to allow for complete threading between all threads, but the issue then is that it will require an addition of a scheduler, though it may work naively like it does now without a scheduler.
Ivan Grokhotkov
@igrr
i don't think adding a scheduler is such an overhead. it basically maintains an array of threads and runs the ones which aren't paused in a round robin fashion
Baruch Even
@baruch
It's not a big overhead but for most people (possibly all but me) it is not needed. I'll try to see if I can find a way to make it work as it is now when all inactive and still add a scheduler when one is needed.
I was trying to minimize the impact of my crazy ideas on others
Ivan Grokhotkov
@igrr
I feel like it's a premature optimization. First implement it, measure the impact and then, if it's really noticeable in a real application, do something about it.
But if you'd like to think about optimizing this, i'm not going to stop you :)
Baruch Even
@baruch
Let me sleep on it first, I'll see if I can wrap my head around this
geman220
@geman220
I was reading into the ESP WiFi Mesh but there seems to be almost no documentation on how it functions. Is it just setting the ESP to AP+STA? So say for example you have 10 ESPs all 10ft from each other down the line, and your internet facing WiFi can only reach the first 3/10 ESP. Would WiFiMesh create a unique AP+STA on each ESP basically repeating the signal down the line of ESP? Or is this creating a true mesh network where each node will relay the network information / data.
Ivan Kravets
@ivankravets
Baruch Even
@baruch
I've updated from 2.1.0 to 2.2.0 and now it fails to build under platformio due to includes of ../generic/common.h, did anyone notice this? what's the way to fix this?
seclorum
@seclorum
yeah i just noticed the same problem.
gotta say, i'm a little sad that every time i've updated pio, something breaks and my project suffers
i worked around it by commenting out the #include in arduino_pins.h
this to me seems to be a bug. what a pity that platformio doesn't seem to have appropriate tests in place to catch these sorts of bugs, alas.
Baruch Even
@baruch
Are they repackaging and modifying the code from git or are they using it as is?
Michael Miller
@Makuna
@anyone, is there a limit to the number of arguments to a function? I know with AVR it was small but it might have changed since they moved to C11.
Baruch Even
@baruch
I would think that every argument that can't go to a register will be in the stack (assuming some even go in registers in the first place)
After that you are only limited by stack space...
This is a more modern 32bit mcu so I assume no real limits
Michael Miller
@Makuna
@baruch It would seem so, but many platforms impose a limit; just wondering if anyone has hit it yet. I hit it once with a Win32 App, the limit was due to optimizer and could be increased with a flag.
sticilface
@sticilface
Has anyone had any success in trying to flash an ESP via a TEENSY 3.1... I can get it to kind of work... but it bails mid way, and fails....
Me No Dev
@me-no-dev
how are you trying to flash it "via"?
transparent serial or trying to replicate the protocol?
sticilface
@sticilface
the examples i found use code in the sketch to bridge two serial connections
    if ( Serial1.available() ) {
        Serial.write( Serial1.read()  );
    }

    // Send bytes from Computer -> Teensy back to ESP8266
    if ( Serial.available() ) {
        Serial1.write( Serial.read()  );
    }
even if that is the only thing in the loop it gets to 20% and fails... if there is other stuff in the loop then it falls over straight away (i.e. esptool fails to connect)..
wonder if copying the entire available() in one go might be better... just wondering if anyone has managed it?
Me No Dev
@me-no-dev
are the serial speeds the same?
sticilface
@sticilface
same speed?
Me No Dev
@me-no-dev
baudrate :D
sticilface
@sticilface
aye
Me No Dev
@me-no-dev
strange then... if the implementation is good, by all means it should work
sticilface
@sticilface
i know! is gets part of the way then falls over!
I'm just trying different baud rates now. slowing down
Me No Dev
@me-no-dev
what architecture is this teensy3.1?
sticilface
@sticilface
Using teensyduino... so arduino
bingo.... looks like it needed to be faster not slower! baud of 230400 worked.. below that no... how wierd
Me No Dev
@me-no-dev
yeah
sticilface
@sticilface
gonna be difficult to get other stuff to work in the loop as well though
Michael Miller
@Makuna
@sticilface The question about archetexture is, is it AVR, ARM, or ESP8266 (the three big ones). All of the them can be Arduino. Its funny, I thought 3.1 was ARM, but I found both ARM and AVR both listed as 3.1.
sticilface
@sticilface
Its ARM
got it working:)... I'm driving a display and rotary encoder... I made an input button.. that resets the ESP and puts it into flash mode.. then i want to be able to flash it through the teensy as a backup.....
normally i'd just enable wifi mode... but incase i balls it up i want to be able to hard program it...
seem to have it working though
Me No Dev
@me-no-dev
it's ARM