Page 1 of 1

how do I read?

Posted: Sun Oct 27, 2013 9:26 am
by rossbryant1956
In my code (lee's adapted) I have the following lines:

Code: Select all

InternalMemory.write(Mem_B_SwabbieRepeat,6);  
InternalMemory.write(Mem_B_SwabbieTime,1);  
and its called here:

Code: Select all

int repeat=InternalMemory.read(Mem_B_SwabbieRepeat)*60;
int runtime=InternalMemory.read(Mem_B_SwabbieTime)*60;
Questions:

1. What does the 6 in mem...repeat mean? Every 6 hours? 6 minutes?
2. What about mem...time? Run 1 second?
3. So in the code when mem...repeat is times 60 = 360 minutes or every 6 hours?
4. Finally in mem...time is times 60 =60 seconds or something else/

I'd like my swabbie to run probably every 6 hours for about 5 minutes. The code may be working perfectly but I never see it in the portal because of the short durations. Thx in advance

Re: how do I read?

Posted: Sun Oct 27, 2013 9:31 am
by lnevo
Its for every 6 hours for 1 minute (avast marines recommendations)

You need to make sure the memory is initialized if you are using the code i have for init_memory its only going to run once IF you set the reset memory flag...

Re: how do I read?

Posted: Sun Oct 27, 2013 10:04 am
by rossbryant1956
here is what I have:

Code: Select all

InternalMemory.write(Mem_B_ResetMemory,false);
What does "initialized" mean? I can see the values when I do the /mb command

Re: how do I read?

Posted: Sun Oct 27, 2013 10:06 am
by lnevo
Thats fine...you said you had modified my code. You dont need to write mem all the time...once its written it stays written. I had an init_memory function that did the write only once or when needed...

Re: how do I read?

Posted: Mon Oct 28, 2013 11:46 am
by rossbryant1956
Lee, just a quick note to say thx for all your help. I changed my swabbie time in memory to something crazy so I could see it fire in the portal and its working beautifully. The Skimmer, Skimmate, and power code is working as well.

I am still having trouble with some of my if, then's but I'll get back to that in the coming weeks. Again, thx for all your help.

Roscoe

Re: how do I read?

Posted: Mon Oct 28, 2013 1:37 pm
by lnevo
No problem. keep 'em coming...