SacArea-BayDeltaProjects / HydroRDITemplate

CR1000 and CR6 Datalogger template for RDI ADCPs
2 stars 0 forks source link

StoreVariablesFlg Update #12

Open violetteta8 opened 5 years ago

violetteta8 commented 5 years ago

Should update the flag to automatically trigger the file to be written to the USR drive whenever a tech makes a change. (Similar to the SiteVisit table flag)

aconlen commented 5 years ago

Hi Trevor! Hope your're enjoying Maine, chilly, chilly Maine.

I have some code worked up for this but want to run it by you before I put it in my branch (I know, very cautious and it's helpful for me to talk/type through it a bit). I attached what I've done so far in Notepad.

I made new variables for New and Initial: PS1Offset, PS2Offset, PS1Stg and PS2Stg, so that if a tech changes any of these it will trigger a file to be written.

I then added If statements for if the tech changes the offset (or stage) -- Then there is a new offset so flag the StoreVariablesFlg and change the Initial value to the new, changed value. Else leave everything as is. I'm not sure if the nested If statements work how I laid them out.

In the subsequent statement I added the If statement that if StoreVariablesFlg=True, call StoreVariables, which will then write the file to the USR drive.

I'm sure this isn't quite right but any input would be appreciated! I'll keep futzing with it until your return. StoreVariableFlg_20181120.txt

violetteta8 commented 5 years ago

Anna, let's take a look at this together for a minute and then you can continue on your way. At a VERY brief glance, I think you're on the right track for what we're needing.

As part of that, let's go over the branching and such so you can be confident in how to use that system. Branches will allow you to test things and make tweaks to certain areas without creating any differences in the master program.