code: function gainForCommand (cmd) {
    switch (String(cmd)) {
      case obciChannelCmdGain1:
        return 1;
      case obciChannelCmdGain2:
        return 2;
      case obciChannelCmdGain4:
        return 4;
      case obciChannelCmdGain6:
        return 6;
      case obciChannelCmdGain8:
        return 8;
      case obciChannelCmdGain12:
        return 12;
      case obciChannelCmdGain24:
        return 24;
      default:
        throw new Error(`Invalid gain setting of ${cmd} gain must be (0,1,2,3,4,5,6)`);
    }
  }
docs: Get the gain
  @param cmd {Number}
  @returns {Number}