Exemplo n.º 1
0
 public void MessageReceived(LCM.LCM.LCM lcm, string channel, LCMDataInputStream data_stream)
 {
     if (channel == Channels.position_res_channel)
     {
         position_response_t response = new position_response_t(data_stream);
         var _ea = Notification.Instance;
         _ea.GetEvent <PositionResponseReceivedEvent>().Publish(response);
     }
 }
Exemplo n.º 2
0
 private void onGetPositionUpdate(position_response_t res)
 {
     if (IP == res.ip_address && res.status_code == status_codes_t.OK)
     {
         try {
             Pan  = double.Parse(res.pan_value);
             Tilt = double.Parse(res.tilt_value);
             Zoom = double.Parse(res.zoom_value);
             if (Pan != expectedPan || Tilt != expectedTilt || Zoom != expectedZoom)
             {
                 changePTZ(PTZ_MODE.Absolute, expectedPan, expectedTilt, expectedZoom);
             }
         } catch (Exception) { return; }
     }
 }