Exemplo n.º 1
0
        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 );
        }
Exemplo n.º 2
0
        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);
        }