mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
First major wave of PQ refactoring, including but not limited to:
* Default unit is more clearly stated in one place, not restated in many different places, and is not always the SI unit * Converter strategy pattern in CMeasurementUnit, covering linear, affine, and different kinds of sexagesimal units * General reorganization of CMeasurementUnit construction and CPhysicalQuantity methods, not removing any behvaiour * Move duplicated method unitFromSymbol from derived classes into base class CMeasurementUnit * For DBus, CPhysicalQuantity marshals both in its own unit and in the default unit
This commit is contained in:
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
|
||||
qDebug() << "Send speed via interface" << speed;
|
||||
TestserviceTool::sleep(2500);
|
||||
speed.switchUnit(CSpeedUnit::km_h());
|
||||
speed.addUnitValue(1.0);
|
||||
speed.addValueSameUnit(1.0);
|
||||
|
||||
// Aviation
|
||||
CComSystem comSystem = CComSystem("DBUS COM1", CPhysicalQuantitiesConstants::FrequencyInternationalAirDistress(), CPhysicalQuantitiesConstants::FrequencyUnicom());
|
||||
@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
|
||||
testserviceInterface.receiveVariant(qv);
|
||||
testserviceInterface.receiveAltitude(al);
|
||||
qDebug() << "Send altitude via interface" << al;
|
||||
al.addUnitValue(1);
|
||||
al.addValueSameUnit(1);
|
||||
|
||||
CTransponder transponder("transponder", 7000, CTransponder::ModeC);
|
||||
testserviceInterface.receiveTransponder(transponder);
|
||||
|
||||
Reference in New Issue
Block a user