Code: Select all
if (chooseLightning) { lightningMode=LightningModes[random(100)%sizeof(LightningModes)]; chooseLightning=false; }
Code: Select all
if (chooseLightning) { lightningMode=LightningModes[random(100)%sizeof(LightningModes)]; chooseLightning=false; }
Don't do this:89delta wrote:Ok So I figured it out how to use the internal memory locations I think. Just not the actual location so am not sure just yet if it will mess with another setting.
But in Globals add:
#define Mem_B_StormMode 112
Then in checkcloud() find
static byte lightningMode=0; and replace with
static byte lightningMode=InternalMemory.read(Mem_B_StormMode);
Will be testing this right now.
Instead, take this line out:static byte lightningMode=0; and replace with
static byte lightningMode=InternalMemory.read(Mem_B_StormMode);
Code: Select all
if (chooseLightning) { lightningMode=LightningModes[random(100)%sizeof(LightningModes)]; chooseLightning=false; }
Code: Select all
lightningMode=InteralMemory.read(Mem_B_StormMode);
I thought that's what he wanted.lnevo wrote:That does it but then we no longer have random cycling
Oh don't get me wrong guys. Love the random part of it. But enjoying re-learning the code structure on how it all works and trying different things out. Besides the random part wouldn't work with slower drivers unless we can "over-ride" it by being able to select just the "Slow" Mode for the ELN's or other drivers. As the Fast and Mega modes work fine with the LDD's and the CAT4101's i've got laying around.cosmith71 wrote:I thought that's what he wanted.lnevo wrote:That does it but then we no longer have random cycling
True Lee....But I was kinda of thinking along your wanting to turn this into another class and just being able to have the end user select which one to use. Nevermind....am having a brain fart. I get what you're saying now. After you get this into another class we just add the coding for it into our INO:lnevo wrote:Yes, but we should strive to maintain a single code base I'm trying to avoid multiple versions.
With the DCPumps we have a variable UseMemory that we set when we want to use Memory or Override.
We can keep the line in there, but I recommend if Memory is 255 then go with the Array. If it's set than go with the mode that's set.
89, thats the nice thing about the array though, if you have slow drivers, just put Slow Random is useless (for now) with the slow drivers, until someone comes up with a second "slow" method
Done. Went with Mega and Mega2, since Mega1 looks like Megal.lnevo wrote:Cool, but by making the rate a define, we can't modify it on the fly through mem or variable changing. So, let's get away from using #defines for this... At some point I'll be making them all properties of the Cloud class.
My recommendation though would be to make it a separate mode... so Mega1 Mega2. This way we maintain one variable to choose which mode we want. Very cool updates though, keep em coming...
Slave side? Esplain please.rimai wrote:The lightning will have to be incorporated in the slave side. The cloud should be fine.
The RANet bandwidth is not fast enough.
It sends data every 100ms.
Code: Select all
byte LightningModes[] = { Mega, Mega, Mega2, Calm, Calm };