GetTemperature() public method

public GetTemperature ( ) : double
return double
Ejemplo n.º 1
0
 private void HandleTemperatureTag(MyTag t)
 {
     temperatureCelsius = t.GetTemperature();
     temperatureSource = t.GetTemperatureSensor();
     hasNewTempData = true;
 }
Ejemplo n.º 2
0
        private string WriteSensorData(MyTag tag)
        {
            string temp = "";
            switch (tag.GetTagType())
            {
                case TagType.WISP_ACCELEROMETER:
                    temp = temp + "";
                    temp = temp + tag.GetAccel("x");

                    temp = temp + "\t";
                    temp = temp + tag.GetAccel("y");

                    temp = temp + "\t";
                    temp = temp + tag.GetAccel("z");

                    break;
                case TagType.WISP_TEMPERATURE:

                    temp = temp + "Temp= ";
                    temp = temp + tag.GetTemperature();

                    break;
                case TagType.WISP_SOC:
                    if (tag.GetAccessResultData().Length > 0)
                    {
                        int[] data = tag.GetSOCData();
                        for (int i = 0; i < data.Length; i++)
                        {
                            temp = temp + "ADC,";
                            temp = temp + data[i] + ",";

                            temp = temp + "temp,";
                            temp = temp + tag.socFilteredTemperature + ",";
                        }
                    }

                    break;
                default:
                    // no action for now...
                    // this could be commercial tags, etc.
                    break;
            }
            return temp;
        }