Reply To: Webserver

HomeForumsMonoBrick EV3 FirmwareWebserverReply To: Webserver

#5167
Author Image
Jacek S
Participant

Hi Again,

Most of the time it takes 134 ms but every 5-10 sec I have the situation from the screen shoot.
This is all:


    public class JoyPos
    {
        public float X { get; set; }
        public float Y { get; set; }
    }

    public class TruckInfo
    {
        public int Speed { get; set; }
        public float WheelPos { get; set; }
    }

    public class TruckModule : NancyModule
    {

        //Motor motor = new Motor(MotorPort.OutA);

        public TruckModule() : base("/truck")
        {
            Get["/info"] = x => Response.AsJson(Info);

            Post["/joypos"] = x => 
            {
                return "";
            };
        }

        public TruckInfo Info
        {
            get { return new TruckInfo() {Speed = 10}; }
        }
    }

On HttpListener I have latency ~50ms (I seen max 120ms) and the startup time about 5sec

Jacek

Posted in

Make a donation