Changeset View
Changeset View
Standalone View
Standalone View
kstars/indi/indiweather.cpp
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 38 | { | |||
---|---|---|---|---|---|
44 | } | 44 | } | ||
45 | } | 45 | } | ||
46 | 46 | | |||
47 | DeviceDecorator::processLight(lvp); | 47 | DeviceDecorator::processLight(lvp); | ||
48 | } | 48 | } | ||
49 | 49 | | |||
50 | void Weather::processNumber(INumberVectorProperty *nvp) | 50 | void Weather::processNumber(INumberVectorProperty *nvp) | ||
51 | { | 51 | { | ||
52 | if (nvp == nullptr) | ||||
53 | return; | ||||
54 | std::vector<WeatherData> entries; | ||||
55 | | ||||
56 | // read all sensor values recieved | ||||
57 | for (int i = 0; i < nvp->nnp; i++) | ||||
58 | { | ||||
59 | INumber number = nvp->np[i]; | ||||
60 | entries.push_back({QString(number.name), QString(number.label), number.value}); | ||||
61 | } | ||||
62 | emit newWeatherData(entries); | ||||
63 | | ||||
64 | // and now continue with the standard behavior | ||||
52 | DeviceDecorator::processNumber(nvp); | 65 | DeviceDecorator::processNumber(nvp); | ||
53 | } | 66 | } | ||
54 | 67 | | |||
55 | void Weather::processSwitch(ISwitchVectorProperty *svp) | 68 | void Weather::processSwitch(ISwitchVectorProperty *svp) | ||
56 | { | 69 | { | ||
57 | DeviceDecorator::processSwitch(svp); | 70 | DeviceDecorator::processSwitch(svp); | ||
58 | } | 71 | } | ||
59 | 72 | | |||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |