pixie16 / paass

Pixie Acquisition and Analysis Software Suite
https://pixie16.github.io/paassdoc/
GNU General Public License v3.0
10 stars 29 forks source link

poll2's pwrite command does not write settings to the set file. #259

Closed ksmith0 closed 7 years ago

ksmith0 commented 7 years ago

It was discovered that when performing a pwrite command from poll2 the output is not saved to the set file. The output is saved if using pwrite from the command line. THe log file indicates that the call to Write the DSP parameters is never performed:

POLL2 $ pwrite 5 -1 TAU 50
  MOD  5  CHAN  0              TAU  54 -> 50
  MOD  5  CHAN  1              TAU  54 -> 50
  MOD  5  CHAN  2              TAU  54 -> 50
  MOD  5  CHAN  3              TAU  54 -> 50
  MOD  5  CHAN  4              TAU  54 -> 50
  MOD  5  CHAN  5              TAU  54 -> 50
  MOD  5  CHAN  6              TAU  54 -> 50
  MOD  5  CHAN  7              TAU  54 -> 50
  MOD  5  CHAN  8              TAU  54 -> 50
  MOD  5  CHAN  9              TAU  54 -> 50
  MOD  5  CHAN 10              TAU  54 -> 50
  MOD  5  CHAN 11              TAU  54 -> 50
  MOD  5  CHAN 12              TAU  54 -> 50
  MOD  5  CHAN 13              TAU  54 -> 50
  MOD  5  CHAN 14              TAU  54 -> 50
  MOD  5  CHAN 15              TAU  54 -> 50
POLL2 $ 

This is do to the incorrectly constructed error checking (added in commit 242cf886b832bc7):

for (int mod = modStart; mod <= modStop; mod++) {
   for (int ch = chStart; ch <= chStop; ch++) {
      if(forChannel(pif, mod, ch, writer, make_pair(arguments.at(2), value))){ 
         error = true;
      }
   }
}
if (!error) pif->SaveDSPParameters();
tking53 commented 7 years ago

I closed this. (accidentally logged in as the dummy)