Skip to content

Commit

Permalink
Request firmware version
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolas-LFDesigns committed Mar 15, 2017
1 parent 6cebd9f commit 55f5428
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ private void getDataPoint(String peer) throws JfgException {
ArrayList<JFGDPMsg> dp = new ArrayList<>();
dp.add(new JFGDPMsg(201, 0));// query dev network
dp.add(new JFGDPMsg(206, 0));// query dev battery
dp.add(new JFGDPMsg(207, 0));// fw version
long seq = 0;
try {
seq = JfgAppCmd.getInstance().robotGetData(peer, dp, 1, false, 0);
Expand Down Expand Up @@ -215,6 +216,11 @@ public void OnRobotGetDataRsp(RobotoGetDataRsp rsp) throws IOException {
int battery = JfgMsgPackUtils.unpack(dp.packValue, Integer.class);
SLog.i("cid: " + rsp.identity + " , battery: " + battery);

} else if (entry.getKey() == 207) {
if (entry.getValue().isEmpty()) continue;
JFGDPMsg dp = entry.getValue().get(0);
String fwversion = JfgMsgPackUtils.unpack(dp.packValue, String.class);
SLog.i("cid: " + rsp.identity + " , fw version: " + fwversion);
}

if (201 != entry.getKey()) continue;
Expand Down

0 comments on commit 55f5428

Please sign in to comment.