Renderer, ...: use PixelRect::GetCenter()
[xcsoar.git] / src / Device / All.cpp
blob0cf29c1b1bbd1da3506e9d0803ccd15fd1cdd889
1 /*
2 Copyright_License {
4 XCSoar Glide Computer - http://www.xcsoar.org/
5 Copyright (C) 2000-2013 The XCSoar Project
6 A detailed list of copyright holders can be found in the file "AUTHORS".
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #include "Device/All.hpp"
25 #include "Device/List.hpp"
26 #include "Device/Descriptor.hpp"
28 void
29 devTick()
31 int i;
33 for (i = 0; i < NUMDEV; i++) {
34 DeviceDescriptor &device = *device_list[i];
35 device.OnSysTicker();
39 void
40 AllDevicesAutoReopen(OperationEnvironment &env)
42 for (unsigned i = 0; i < NUMDEV; i++) {
43 DeviceDescriptor &d = *device_list[i];
44 d.AutoReopen(env);
48 void
49 AllDevicesPutMacCready(fixed mac_cready, OperationEnvironment &env)
51 for (unsigned i = 0; i < NUMDEV; ++i)
52 device_list[i]->PutMacCready(mac_cready, env);
55 void
56 AllDevicesPutBugs(fixed bugs, OperationEnvironment &env)
58 for (unsigned i = 0; i < NUMDEV; ++i)
59 device_list[i]->PutBugs(bugs, env);
62 void
63 AllDevicesPutBallast(fixed fraction, fixed overload,
64 OperationEnvironment &env)
66 for (unsigned i = 0; i < NUMDEV; ++i)
67 device_list[i]->PutBallast(fraction, overload, env);
70 void
71 AllDevicesPutVolume(unsigned volume, OperationEnvironment &env)
73 for (unsigned i = 0; i < NUMDEV; ++i)
74 device_list[i]->PutVolume(volume, env);
77 void
78 AllDevicesPutActiveFrequency(RadioFrequency frequency,
79 OperationEnvironment &env)
81 for (unsigned i = 0; i < NUMDEV; ++i)
82 device_list[i]->PutActiveFrequency(frequency, env);
85 void
86 AllDevicesPutStandbyFrequency(RadioFrequency frequency,
87 OperationEnvironment &env)
89 for (unsigned i = 0; i < NUMDEV; ++i)
90 device_list[i]->PutStandbyFrequency(frequency, env);
93 void
94 AllDevicesPutQNH(const AtmosphericPressure &pres,
95 OperationEnvironment &env)
97 for (unsigned i = 0; i < NUMDEV; ++i)
98 device_list[i]->PutQNH(pres, env);
101 void
102 AllDevicesNotifySensorUpdate(const MoreData &basic)
104 for (unsigned i = 0; i < NUMDEV; ++i)
105 device_list[i]->OnSensorUpdate(basic);
108 void
109 AllDevicesNotifyCalculatedUpdate(const MoreData &basic,
110 const DerivedInfo &calculated)
112 for (unsigned i = 0; i < NUMDEV; ++i)
113 device_list[i]->OnCalculatedUpdate(basic, calculated);