lib/testlistener.js
/**
 * Update the simulated RSSI values
 * @param {TestListener} instance The given instance.
 */
Update the simulated RSSI values
@param {TestListener} instance The given instance.
Update the simulated RSSI values @param { TestListener } instance The given instance .
function updateSimulatedRssi(instance) {
  for(let index = 0; index < instance.rssi.length; index++) {
    instance.rssi[index] += Math.floor((Math.random() * RSSI_RANDOM_DELTA) -
                                       (RSSI_RANDOM_DELTA / 2));
    if(instance.rssi[index] > MAX_RSSI) {
      instance.rssi[index] = MAX_RSSI;
    }
    else if(instance.rssi[index] < MIN_RSSI) {
      instance.rssi[index] = MIN_RSSI;
    }
  }
}
function updateSimulatedRssi ( instance ) { for ( let index = 0 ; index < instance . rssi . length ; index ++ ) { instance . rssi [ index ] += Math . floor ( ( Math . random ( ) * RSSI_RANDOM_DELTA ) - ( RSSI_RANDOM_DELTA / 2 ) ) ; if ( instance . rssi [ index ] > MAX_RSSI ) { instance . rssi [ index ] = MAX_RSSI ; } else if ( instance . rssi [ index ] < MIN_RSSI ) { instance . rssi [ index ] = MIN_RSSI ; } } }
Update the simulated RSSI values
 @param {TestListener} instance The given instance.
Update the simulated RSSI values @param { TestListener } instance The given instance .