示例#1
0
 /// <summary>
 /// Request battery instantaneous current draw
 /// </summary>
 /// <returns>True if request was successful, false otherwise</returns>
 public bool reqBatteryInstCurrent()
 {
     if (traqpaq.sendCommand(USBcommand.USB_CMD_REQ_BATTERY_INSTANT, InstCurrentRead))
     {
         this.CurrentInst = BetterBitConverter.ToInt16(InstCurrentRead, 0) * Constants.BATT_INST_CURRENT_FACTOR;
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#2
0
 public AccelerometerSelfTest(byte[] readBuff)
 {
     SelfTest_X = BetterBitConverter.ToInt16(readBuff, 0);
     SelfTest_Y = BetterBitConverter.ToInt16(readBuff, 2);
     SelfTest_Z = BetterBitConverter.ToInt16(readBuff, 4);
 }
示例#3
0
 public AccelerometerFiltered(byte[] readBuff)
 {
     Filtered_X = BetterBitConverter.ToInt16(readBuff, 0);
     Filtered_Y = BetterBitConverter.ToInt16(readBuff, 2);
     Filtered_Z = BetterBitConverter.ToInt16(readBuff, 4);
 }
示例#4
0
 public AccelerometerNormalized(byte[] readBuff)
 {
     Normalized_X = BetterBitConverter.ToInt16(readBuff, 0);
     Normalized_Y = BetterBitConverter.ToInt16(readBuff, 2);
     Normalized_Z = BetterBitConverter.ToInt16(readBuff, 4);
 }
示例#5
0
 public Position(byte[] readBuff)
 {
     latitude  = BetterBitConverter.ToInt32(readBuff, 0) / Constants.LATITUDE_LONGITUDE_COORD;
     longitude = BetterBitConverter.ToInt32(readBuff, 4) / Constants.LATITUDE_LONGITUDE_COORD;
     heading   = BetterBitConverter.ToInt16(readBuff, 8) / Constants.COURSE_FACTOR;
 }