public HRMSensor(Device device) : base(device) { ChannelNumber = 1; TransmissionType = Settings.Default.hrmTransType; // search by default DeviceNumber = Settings.Default.hrmDeviceNum; // search by default DeviceType = 120; Period = 8070; RadioFrequency = 57; }
public SpeedSensor(Device device) : base(device) { }
private const ushort MULTI_TICK_THRESHOLD = 2; // equivalent to 500RPM! #endregion Fields #region Constructors public SpeedCadenceSensor(Device device) : base(device) { ChannelNumber = 2; TransmissionType = Settings.Default.spcdTransType; // search by default DeviceNumber = Settings.Default.spcdDeviceNum; // search by default DeviceType = 121; Period = 8086; RadioFrequency = 57; }
public CadenceSensor(Device device) : base(device) { }
public Sensor(Device device) { syncContext = AsyncOperationManager.SynchronizationContext; _processor = new SensorProcessor(this); _processor.Device = device; device.AddSensorProcessor(_processor); _processor.SensorStatusChanged += new SensorStatusChangedHandler(StatusChanged); }
public PowerSensor(Device device) : base(device) { ChannelNumber = 5; TransmissionType = 0; DeviceNumber = 0; DeviceType = 11; Period = 8182; RadioFrequency = 57; }
public void Initialise() { // Test mode Device UsbStick = new Device(); UsbStick.Initialise(); Hrm = new HRMSensor(UsbStick); SpeedCadence = new SpeedCadenceSensor(UsbStick); Speed = new SpeedSensor(UsbStick); Cadence = new CadenceSensor(UsbStick); Power = new PowerSensor(UsbStick); Hrm.SensorMessage += SensorMessageReceived; SpeedCadence.SensorMessage += SensorMessageReceived; Speed.SensorMessage += SensorMessageReceived; Cadence.SensorMessage += SensorMessageReceived; Power.SensorMessage += SensorMessageReceived; // send data to the server every 750ms _sendDataTimer = new Timer(SendDataToServer, null, 2000, 750); }