src/utilities.js
function setChSetFromADSRegisterQuery (str, channelSettings) {
  let key = k.OBCIRegisterQueryNameCHnSET[channelSettings.channelNumber];
  if (key === undefined) key = k.OBCIRegisterQueryNameCHnSET[channelSettings.channelNumber - k.OBCINumberOfChannelsCyton];
  channelSettings.powerDown = getBooleanFromRegisterQuery(str, key, 16);
  channelSettings.gain = k.gainForCommand(getNumFromThreeCSVADSRegisterQuery(str, key, 19));
  channelSettings.inputType = k.inputTypeForCommand(getNumFromThreeCSVADSRegisterQuery(str, key, 31));
  channelSettings.srb2 = getBooleanFromRegisterQuery(str, key, 28);
}
function setChSetFromADSRegisterQuery (str, channelSettings) {
  let key = k.OBCIRegisterQueryNameCHnSET[channelSettings.channelNumber];
  if (key === undefined) key = k.OBCIRegisterQueryNameCHnSET[channelSettings.channelNumber - k.OBCINumberOfChannelsCyton];
  channelSettings.powerDown = getBooleanFromRegisterQuery(str, key, 16);
  channelSettings.gain = k.gainForCommand(getNumFromThreeCSVADSRegisterQuery(str, key, 19));
  channelSettings.inputType = k.inputTypeForCommand(getNumFromThreeCSVADSRegisterQuery(str, key, 31));
  channelSettings.srb2 = getBooleanFromRegisterQuery(str, key, 28);
}
function setChSetFromADSRegisterQuery ( str , channelSettings ) { let key = k . OBCIRegisterQueryNameCHnSET [ channelSettings . channelNumber ] ; if ( key === undefined ) key = k . OBCIRegisterQueryNameCHnSET [ channelSettings . channelNumber - k . OBCINumberOfChannelsCyton ] ; channelSettings . powerDown = getBooleanFromRegisterQuery ( str , key , 16 ) ; channelSettings . gain = k . gainForCommand ( getNumFromThreeCSVADSRegisterQuery ( str , key , 19 ) ) ; channelSettings . inputType = k . inputTypeForCommand ( getNumFromThreeCSVADSRegisterQuery ( str , key , 31 ) ) ; channelSettings . srb2 = getBooleanFromRegisterQuery ( str , key , 28 ) ; }
Used to get bias setting from raw query
@param str {String} - The raw query data
@param channelSettings {ChannelSettingsObject} - Just your standard channel setting object
@returns {boolean}
Used to get bias setting from raw query