public void updateOTAInfo(String initiatedBy) { long now = System.currentTimeMillis(); this.deviceOtaInfo = new DeviceOtaInfo(initiatedBy, now, now); }
private void sendOtaCommand(ChannelHandlerContext ctx, Device device, OTAInfo otaInfo) { StringMessage msg = makeASCIIStringMessage(BLYNK_INTERNAL, 7777, otaInfo.makeHardwareBody(serverHostUrl)); if (ctx.channel().isWritable()) { device.deviceOtaInfo = new DeviceOtaInfo(otaInfo.initiatedBy, otaInfo.initiatedAt, System.currentTimeMillis()); ctx.write(msg, ctx.voidPromise()); } }