protected override void OnGenerateCommandMessage( ICommandMessageGenerator gen ) { HalfBytePacket cmdPacket = new HalfBytePacket() { LowHalf = 0x07 }; Packet dataPacket; if( Command == Commands.Direct ) { cmdPacket.HighHalf = 0x04; dataPacket = new LowHalfShortPacket() { Value = (short)DirectZoomPosition }; } else { dataPacket = new LiteralBytesPacket( (byte)( Command + VariableZoom ) ); } gen.CreateMessage( cmdPacket, dataPacket ); }
protected override void OnGenerateCommandMessage(ICommandMessageGenerator gen) { HalfBytePacket cmdPacket = new HalfBytePacket() { LowHalf = 0x07 }; Packet dataPacket; if (Command == Commands.Direct) { cmdPacket.HighHalf = 0x04; dataPacket = new LowHalfShortPacket() { Value = (short)DirectZoomPosition }; } else { dataPacket = new LiteralBytesPacket((byte)(Command + VariableZoom)); } gen.CreateMessage(cmdPacket, dataPacket); }