Compare commits

..

1096 Commits

Author SHA1 Message Date
Rick Lan f05c3bf7e4 update ota/recovery url 2020-11-10 12:37:18 +10:00
Rick Lan 2baa9ba237 re-add apks 2020-04-07 20:10:00 +10:00
dragonpilot 76f5fae57a Merge pull request #10 from dragonpilot-community/devel
dp 0.7.2 bug fixes
2020-02-14 11:19:18 +10:00
dragonpilot b775c348eb Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2020-02-14 11:13:29 +10:00
dragonpilot cf55da6a1d DragonCachedSource does not use utf8 2020-02-14 11:13:07 +10:00
Willem Melching 997c7bb3bb Add Corolla Hybrid TSS2 eps firmware version 2020-02-11 13:55:47 -08:00
Willem Melching ae50520cb4 Add engine FW version for Camry Hybrid 2020-02-11 13:54:11 -08:00
dragonpilot c699406311 force git command to run in /data/openpilot/ 2020-02-11 17:08:15 +10:00
dragonpilot c2606fe030 * delete ish dbc
* car_helpers to catch EOFError exception
* dashcam to catch OSError exception
* dragonconf default to stock settings
2020-02-11 12:12:41 +10:00
ZwX1616 1cb08640a1 fix not resetting on interaction (#1063) 2020-02-08 11:22:21 -08:00
dragonpilot 3626907436 Merge pull request #9 from dragonpilot-community/devel
dp 0.7.2
2020-02-08 13:18:47 +10:00
dragonpilot ac6d7c8b71 Merge branch 'devel-staging' of https://github.com/commaai/openpilot into devel 2020-02-07 12:30:47 +10:00
dragonpilot cbc0a247bd Merge branch 'devel' of https://github.com/dragonpilot-community/dragonpilot into devel 2020-02-07 11:54:45 +10:00
dragonpilot 88c0eb970c dp v0.7.2 init update
* migrate to v0.7.2
* increase mini dev bar font size
* update APKs
   * system APKs updated to v0.7.2
   * autonavi updated to v4.5.0.600053
* use old updated
* Add missing auto start Aegis app option.
2020-02-07 11:42:48 +10:00
Vehicle Researcher 2ef8a28f82 openpilot v0.7.2 release 2020-02-06 13:51:42 -08:00
Vehicle Researcher 1c3051aa6a Merge opendbc subtree 2020-02-06 13:51:38 -08:00
Vehicle Researcher 69df34bf0f Squashed 'opendbc/' changes from 5081966f..d68f8ff0
d68f8ff0 Clean up .gitignore
e82757b9 Add Lexus NX300H (#214)
745a2bb0 Removed non high voltage items. Added units.
fafd091a Added High Voltage Management to powertrain file.
15b6b316 Update subaru_global_2017.dbc
a12af19a Add steering error signal in subaru global
d411c175 correct max value
881c065d add electrical gear and fix driver torque
1bbac4b8 Add reference to CANdevStudio in README file
8f70ea01 Adds 2016 Honda CR-V Executive

git-subtree-dir: opendbc
git-subtree-split: d68f8ff0cd6bd00a4aa5b7b83efd4b1aa9916452
2020-02-06 13:51:38 -08:00
Vehicle Researcher ad427d4164 Merge panda subtree 2020-02-06 13:51:37 -08:00
Vehicle Researcher 4ea182a1b1 Squashed 'panda/' changes from 3b356216..73a60d5c
73a60d5c uds: clear rx buffer on drain
3b20804b uds: rx message buffering
d034f3e9 Added the option to turn on IR in power savings mode (#431)
82cafd10 Allow fan control in power saving (#429)
186d9dcb Fixed GMLAN interrupts when used in Tesla safety (#428)
f67ec28e Fix msg checks for non Honda and Toyota (#426)

git-subtree-dir: panda
git-subtree-split: 73a60d5c9c358e9d5c24aff2f605c3ab650fc74d
2020-02-06 13:51:37 -08:00
Vehicle Researcher f83537c1ad Merge cereal subtree 2020-02-06 13:51:36 -08:00
Vehicle Researcher 60d3364233 Squashed 'cereal/' changes from 01942b89..ab32956a
ab32956a Merge pull request #27 from commaai/ublox-hw-status
2e7f4b90 Added ublox hw status
23abef4f add networkType to thermal
3f01dcf0 fix bad naming
4999e620 unconfusing and accessible to all
8f9aa8fc add fingerprintSource to carParams
57940309 better put
06f8d15c standalone monitorstate (#23)
6eb1e368 qlog at model rate
c38fb572 LateralParams
0c45f20d add uncertainty event name

git-subtree-dir: cereal
git-subtree-split: ab32956aaf927ee6318bcf639e3a25eea72027a9
2020-02-06 13:51:36 -08:00
dragonpilot a0fc7d03b8 update spinner logo 2020-02-06 22:57:48 +10:00
dragonpilot 57f1f655a3 spinner use dp logo 2020-02-06 22:57:35 +10:00
dragonpilot 13af3584a0 increase mini dev bar font size 2020-02-06 22:56:47 +10:00
dragonpilot 20956d393d add back deprecated param 2020-02-05 17:34:06 +10:00
dragonpilot 0a6cd3b29c fix duplicate ordinal number 2020-02-05 17:26:58 +10:00
dragonpilot 718bc60201 add support of fw based cache fp 2020-02-05 14:34:43 +10:00
dragonpilot a4d950d9a2 Merge branch 'devel-staging' of https://github.com/commaai/openpilot into devel 2020-02-05 13:46:07 +10:00
Vehicle Researcher 082bf83e59 openpilot v0.7.2 release 2020-02-03 16:15:37 -08:00
Vehicle Researcher 2567a1902f Merge opendbc subtree 2020-02-03 16:15:31 -08:00
Vehicle Researcher ecb3136cb7 Squashed 'opendbc/' changes from 5081966f..745a2bb0
745a2bb0 Removed non high voltage items. Added units.
fafd091a Added High Voltage Management to powertrain file.
15b6b316 Update subaru_global_2017.dbc
a12af19a Add steering error signal in subaru global
d411c175 correct max value
881c065d add electrical gear and fix driver torque
1bbac4b8 Add reference to CANdevStudio in README file
8f70ea01 Adds 2016 Honda CR-V Executive

git-subtree-dir: opendbc
git-subtree-split: 745a2bb00dad694fb8fcacaea5aaa9207bef06a7
2020-02-03 16:15:31 -08:00
Vehicle Researcher 1fef43e09d Merge panda subtree 2020-02-03 16:15:30 -08:00
Vehicle Researcher f5a2358cf5 Squashed 'panda/' changes from 3b356216..d034f3e9
d034f3e9 Added the option to turn on IR in power savings mode (#431)
82cafd10 Allow fan control in power saving (#429)
186d9dcb Fixed GMLAN interrupts when used in Tesla safety (#428)
f67ec28e Fix msg checks for non Honda and Toyota (#426)

git-subtree-dir: panda
git-subtree-split: d034f3e9c08130f7c933525af98e2c4ccb14b7c4
2020-02-03 16:15:30 -08:00
Vehicle Researcher addf86fc94 Merge cereal subtree 2020-02-03 16:15:29 -08:00
Vehicle Researcher b160847119 Squashed 'cereal/' changes from 01942b89..23abef4f
23abef4f add networkType to thermal
3f01dcf0 fix bad naming
4999e620 unconfusing and accessible to all
8f9aa8fc add fingerprintSource to carParams
57940309 better put
06f8d15c standalone monitorstate (#23)
6eb1e368 qlog at model rate
c38fb572 LateralParams
0c45f20d add uncertainty event name

git-subtree-dir: cereal
git-subtree-split: 23abef4fdb18bc2b06281f9937ed3e7fc31e5c37
2020-02-03 16:15:29 -08:00
dragonpilot ee04101f19 Hyundai to support 'Enable Lateral Control', 'Allow Gas', 'Enable Steering On Signal' features. 2020-02-03 14:36:28 +10:00
dragonpilot ea3be014b3 remove temp/battery level display to fix black/freeze screen. 2020-01-31 17:18:40 +10:00
dragonpilot 41b72be473 fix temp/battery display issue 2020-01-29 21:55:12 +10:00
dragonpilot 10326cf5b2 add battery level and temp to driving ui. 2020-01-23 14:56:07 +10:00
dragonpilot 9adbd34055 fixed issues in appd that cause offroad to crash. 2020-01-23 14:55:30 +10:00
dragonpilot 82664eee20 fix no keyboard issue in full screen app (waze) 2020-01-22 15:05:59 +10:00
dragonpilot 03bd19c10d fix display issue when opening full screen apps. 2020-01-22 15:04:55 +10:00
dragonpilot 1e79936d3d add steer ratio learner toggle 2020-01-22 15:03:38 +10:00
dragonpilot e9af0ed208 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2020-01-22 14:31:29 +10:00
Willem Melching 6cf3ef4105 update athenad.py 2020-01-21 12:18:16 -08:00
Willem Melching 75b924fb44 update common/android.py 2020-01-21 11:52:33 -08:00
dragonpilot 5cc176f3ec Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2020-01-21 14:12:40 +10:00
Willem Melching 355b92d7d4 catch exception in uploader.py 2020-01-20 11:30:04 -08:00
Willem Melching 30a194a38d update frame apk 2020-01-19 16:06:26 -08:00
andyh2 0eb1b1b6a3 apk lib: Grant offroad access to TelephonyManager 2020-01-19 15:17:12 -08:00
Willem Melching de2ccfedbc update offroad apk: fix pairing 2020-01-19 14:00:39 -08:00
Willem Melching b5a7a39a39 Panda signature needs to be bytes 2020-01-19 09:42:10 -08:00
dragonpilot 71d2e9043c Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2020-01-19 20:41:39 +10:00
dragonpilot 019f70c086 simplify alc logic 2020-01-19 20:29:24 +10:00
Willem Melching b4ce7e5c07 hotfix panda#426 2020-01-18 13:39:47 -08:00
dragonpilot a801285d3d remove hotspot monkey script 2020-01-18 22:31:55 +10:00
dragonpilot 61b4a574dd fix migration issue 2020-01-18 22:29:59 +10:00
dragonpilot 6d368c430b use pkill instead pm to close apps 2020-01-18 18:23:42 +10:00
dragonpilot 9495943481 update apks to 0.7.1 version 2020-01-18 18:02:06 +10:00
dragonpilot 9a08b26d54 fixing 0.7.1 merge conflicts 2020-01-17 22:32:21 +10:00
dragonpilot 2eb80acd9b Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2020-01-17 22:31:23 +10:00
Willem Melching cc35879b9d Merge pull request #949 from commaai/nightly
openpilot v0.7.1
2020-01-16 16:42:43 -08:00
Willem Melching bf7ff4748a registration: send up both imeis 2020-01-16 11:43:09 -08:00
Vehicle Researcher 5a62944e9e openpilot v0.7.1 release 2020-01-15 14:05:04 -08:00
Vehicle Researcher a318eda7cb Merge opendbc subtree 2020-01-15 14:04:44 -08:00
Vehicle Researcher d7199af38d Merge commit 'b0b7a768f00d08fa30d7463efd0d05fcd5490088' as 'panda' 2020-01-15 14:04:42 -08:00
Vehicle Researcher ef206d8b4c Remove old panda subtree 2020-01-15 14:04:40 -08:00
Vehicle Researcher 6c0b83ff6d Merge cereal subtree 2020-01-15 14:04:38 -08:00
dragonpilot 1d8aec0fe3 add ability to turn on hotspot on boot. 2020-01-14 15:29:00 +10:00
dragonpilot afcf4daa51 refactor appd 2020-01-14 14:17:32 +10:00
dragonpilot 6cbde9f3e4 add DragonBTG mode 2020-01-08 15:05:31 +10:00
dragonpilot ecef8200d5 add support to 2018 Lexus RX300 China ver 2020-01-06 13:15:08 +10:00
dragonpilot 379fed7f58 fix issue that may install apks every time 2019-12-31 18:11:46 +10:00
Rick Lan b0c0357eb0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-12-29 21:17:25 +10:00
Rick Lan 9d5db97d1c Move ALCs min speed / timer to variables. 2019-12-29 21:13:22 +10:00
rbiasini cccafa7b64 Honda fwd fixes (#5)
- fix chime forwarding
- forward radar hud msg from stock
- no EON chime during stock fcw
2019-12-25 21:38:00 -08:00
dragonpilot 8317227583 increase min speed to use assist lc / auto lc 2019-12-18 14:34:12 +10:00
dragonpilot 6447f53d58 remove 2017 Civic Hatchback LX fingerprint because it will cause issue with others. 2019-12-18 14:30:55 +10:00
dragonpilot 695d5746fe update auto_lc logic, fix incorrect auto_lc alert. 2019-12-18 11:57:11 +10:00
Riccardo 43f2402e90 README update with FCA harness support 2019-12-16 18:33:21 -08:00
dragonpilot 2862f3006c auto lane change send alerts 2019-12-17 11:02:36 +10:00
dragonpilot 27c2af7e42 Merge pull request #8 from eFiniLan/dp-devel-en
Auto LC
2019-12-17 10:06:22 +10:00
dragonpilot e5d748d15e Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-12-17 10:03:28 +10:00
dragonpilot 6a6b1509e9 fix langauge issue 2019-12-17 10:02:02 +10:00
rbiasini 8abdb9f9c5 Honda Nidec: fix missing signals from dbc files (#919) 2019-12-16 20:27:01 +01:00
Rick Lan 09be37c457 update apks, fix up ALC logic 2019-12-17 01:18:45 +10:00
dragonpilot b7574d3a55 migrate to 0.7 2019-12-16 17:13:44 +10:00
dragonpilot c62d0f63f2 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-12-16 11:23:05 +10:00
Willem Melching f798009e3d add common/kalman/.gitignore 2019-12-14 12:47:28 -08:00
Riccardo fd4a8b2f9f Allow more time for snapshots and increase alert priority for disallowed community feature 2019-12-14 10:36:39 -08:00
Vehicle Researcher 36282d9752 openpilot v0.7 release 2019-12-13 13:03:08 -08:00
Vehicle Researcher 37134796c0 Merge opendbc subtree 2019-12-13 13:02:48 -08:00
Vehicle Researcher 9bfdab095f Merge panda subtree 2019-12-13 13:02:46 -08:00
Vehicle Researcher 0cf43202d7 Merge cereal subtree 2019-12-13 13:02:45 -08:00
rbiasini 9b0db32efc Update README.md and SAFETY.md (#907)
* Update README.md and SAFETY.md
2019-12-10 19:36:06 -08:00
dragonpilot cc3dd034ee Merge branch 'devel-unsupported-cars' into devel-en 2019-12-10 16:26:15 +10:00
dragonpilot 88a2a7e175 remove duplicated fp 2019-12-10 16:25:36 +10:00
dragonpilot 7fc6536940 Merge branch 'devel-unsupported-cars' into devel-en 2019-12-10 16:24:46 +10:00
dragonpilot 9ba4721162 add 2 more fingerprints from shell 2019-12-10 16:24:21 +10:00
dragonpilot d2a0d11c59 Merge branch 'devel-unsupported-cars' into devel-en 2019-12-10 16:12:25 +10:00
dragonpilot b061cbef90 add 17' Civic Hatchback LX fingerprint from CFranHonda 2019-12-10 16:12:05 +10:00
dragonpilot df67387ca9 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-12-10 16:08:43 +10:00
dragonpilot 9a1e4ff917 add waze mode 2019-12-10 11:24:49 +10:00
Arne Schwarck 5bf610ddf2 Battery protection (#888)
* Battery protection

If your car battery voltage is lower than 0% switch off charging to stop the Eon from damaging the 12v car battery. Leaving you with a car that can not start but has a fully charged eon ;-)

* add rbiasini comment && !ignition

* Update Offroad_ChargeDisabled with voltage low

* simplify alert

* non-temporal hysteresis from @rbiasini

And up the start charge limit to 12v. i.e. 50% car battery voltage

* once battery power recovers to 11.500 volts charge

This leaves 1v inbetween for any fluctuations that could occur.

* fix indent

* Fix indent of whole block

It looks like sometimes when you copy and paste into the github web interface some white spacing gets added or removed. BE AWARE!
2019-12-04 11:46:39 -08:00
dragonpilot ad2e92f057 add china 2019 corolla 2019-11-28 14:38:12 +10:00
dragonpilot b54a0ccb95 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-11-28 14:37:24 +10:00
dragonpilot 29ab7b80d8 add ability to disable steering ratio learner 2019-11-27 10:09:41 +10:00
Shane Smiskol f559477ab1 Fix typo (#891) 2019-11-25 21:40:51 -08:00
dragonpilot 31fc2a50fb update APK, allow use of lead car moving alert without enable OP 2019-11-21 09:21:58 +10:00
dragonpilot 9c7e80ebe2 update APK 2019-11-19 16:03:42 +10:00
dragonpilot 65d57ff9e5 update APK 2019-11-19 10:10:00 +10:00
dragonpilot 27f8443b9e update APK 2019-11-18 08:02:07 +10:00
dragonpilot 2f28bdad81 bug fix 2019-11-15 18:28:59 +10:00
dragonpilot ce44aa7696 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-11-15 09:25:54 +10:00
dragonpilot bdea69d89b update batt ctrl logic, update APK 2019-11-15 09:10:53 +10:00
Willem Melching abd3c6b5dc Update driving model (#880) 2019-11-14 13:51:35 -08:00
dragonpilot f700370a8e update APK 2019-11-13 13:13:07 +10:00
dragonpilot f462f640f8 only check hw type once in thermald automatically 2019-11-13 11:35:10 +10:00
Jason Young 75618d6ce7 Fixes for various merge and refactoring fallout, typo fixes. (#878)
* Fixes for various merge and refactoring fallout, typo fixes.

* Tab->Spaces
2019-11-12 17:19:34 -08:00
dragonpilot c25b3def82 add dragon_is_eon param 2019-11-12 11:00:19 +10:00
dragonpilot 1c75d7fb14 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-11-11 10:48:03 +10:00
dragonpilot faf9a36067 update APKs, add lead car detected alert 2019-11-11 10:16:43 +10:00
Alex Wang 50eae23440 Add fingerprint (#875) 2019-11-08 23:34:19 -08:00
Willem Melching 14fc0424b8 Make DBC preprocessing deterministic 2019-11-08 17:26:48 -08:00
Willem Melching 7998cf08d3 Make visiond compile on pc (#874) 2019-11-08 12:49:30 -08:00
dragonpilot 0c0ba60ce4 fix GSH issue 2019-11-08 13:10:44 +10:00
Willem Melching 926e5f397f Fix unicode bug in DoUninstall reading 2019-11-07 13:53:42 -08:00
Willem Melching 1d328da675 Fix fan control when not plugged into panda 2019-11-07 11:28:35 -08:00
dragonpilot 39ee5ba5ad update APK 2019-11-07 11:53:09 +10:00
dragonpilot 7983bbd3bd update APK 2019-11-07 11:42:17 +10:00
dragonpilot dc15b9cae9 Add mock radar for Bosch https://github.com/kegman/openpilot/commit/53c945c5cd6716e3953a9baae1431c9a8d984e83 2019-11-06 16:44:43 +10:00
dragonpilot 7750dc7784 fix appd/dashcamd error due to changes in messaging 2019-11-06 16:34:14 +10:00
dragonpilot ad40d8f66d disable update prompt 2019-11-06 15:21:46 +10:00
dragonpilot 4f0fb2ce5d add tw.com.ainvest.outpack to android_packages 2019-11-06 14:57:47 +10:00
dragonpilot 7500d48861 delete signed firmware 2019-11-06 14:50:53 +10:00
dragonpilot 4ed8a032d4 update APK 2019-11-06 12:25:39 +10:00
dragonpilot a49dc4be02 Merge branch 'devel-unsupported-cars' into devel-en 2019-11-06 12:15:05 +10:00
dragonpilot 3b2e7c208a Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-11-06 12:00:30 +10:00
dragonpilot c8ccddcb8d fix GSH issue, ISH use better steer angle sensor 2019-11-06 11:57:08 +10:00
dragonpilot eaff7b4bb4 Merge branch 'devel-unsupported-cars' into devel-en 2019-11-05 13:44:57 +10:00
Riccardo 1ceb7ddf0e Decrease build time for dbc files 2019-11-04 19:23:02 -08:00
dragonpilot 3c0be0b4cd add 2017 Lexus GS450H 2019-11-05 12:08:24 +10:00
Vehicle Researcher 5ed475b25e openpilot v0.6.6 release 2019-11-04 15:13:52 -08:00
dragonpilot 64dbc96480 add aegis speed camera app 2019-11-04 16:43:40 +10:00
dragonpilot 58ca42e7ef update APK 2019-11-01 13:39:11 +10:00
dragonpilot 5ede6a346a remove miui fonts to reduce package size 2019-11-01 13:34:28 +10:00
dragonpilot 5cacbbab13 update offroad to multilangual version 2019-11-01 11:10:54 +10:00
Vehicle Researcher 043e83a160 Merge opendbc subtree 2019-10-31 17:02:32 -07:00
Vehicle Researcher a08e586783 Merge panda subtree 2019-10-31 17:02:31 -07:00
Vehicle Researcher f85f3b36bc Merge cereal subtree 2019-10-31 17:02:27 -07:00
dragonpilot 5af4d3aeed Merge branch 'devel-unsupported-cars' into devel-en 2019-10-31 11:24:09 +10:00
dragonpilot 06f8fd53ec fix merge conflict 2019-10-31 11:23:50 +10:00
dragonpilot d9877e694c Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-31 11:22:02 +10:00
Riccardo d603d5c9b8 Update README with now supported Subaru Harness 2019-10-30 15:15:05 -07:00
Ted Slesinski 8ad2640c11 Adds 2019 Lexus ES (non hybrid) (#866)
* Adds 2019 Lexus ES (non hybrid)

* Updated test route
2019-10-30 10:38:10 -07:00
dragonpilot 2b721f7fc8 update carcontroller.py for honda 2019-10-30 11:56:17 +10:00
dragonpilot 2a29774272 update safety_honda 2019-10-30 10:37:32 +10:00
dragonpilot 4f41bfcd9e fix allow_gas for honda and slightly adjust lead car moving alert value 2019-10-30 09:31:51 +10:00
xBJx 5219d3c023 Added fingerprint from Sienna XLE AWD (#848)
* Added fingerprint from Sienna XLE AWD

* Update driver_monitor.py

* Update driver_monitor.py

* Update driver_monitor.py
2019-10-28 19:26:50 -07:00
dragonpilot 7c0d01a96c add SnG Mod support 2019-10-29 10:02:46 +10:00
dekerr ee752d5669 remove unnecessary comprehensions (#863) 2019-10-28 15:16:37 -07:00
dragonpilot 88af74a3da Adjust dragon_allow_gas logic 2019-10-28 14:12:50 +10:00
dragonpilot 2393c2264c Merge branch 'devel-unsupported-cars' into devel-en 2019-10-28 12:33:51 +10:00
dragonpilot 44bab52730 remove fp 2019-10-28 12:33:27 +10:00
dragonpilot 4ad87130f9 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-28 12:33:16 +10:00
dragonpilot c270f64a07 do not send canError if dragon_toyota_stock_dsu is on 2019-10-28 12:30:04 +10:00
dragonpilot f17f264c1f rename variable 2019-10-28 11:13:27 +10:00
dragonpilot 8ca719e75a Revert "remove gas/brake value modification when allow_gas is enabled"
This reverts commit d3b7d741af.
2019-10-27 09:50:24 +10:00
u8511049 e36a14f1de Add supported car for 2019 Toyota Altis Hybrid (#859)
* add supported car for 2019 Toyota Altis Hybird / Corolla hybrid 2020 (US market)
2019-10-25 10:28:06 -07:00
dragonpilot 6e8ff99781 update lead car alert logic 2019-10-25 09:17:54 +10:00
dragonpilot 9e26bd8a89 remove canbus freq checking 2019-10-24 13:44:03 +10:00
dragonpilot 0df2160823 remove chmod bs 2019-10-22 16:53:36 +10:00
dragonpilot 1ad2ce8b2a slightly adjust es_tss2 port 2019-10-22 11:22:02 +10:00
dragonpilot 61663c77ff ES_TSS2 should be stop_and_go = True 2019-10-21 19:56:32 +10:00
dragonpilot e5431eab5d completely remove params.put for connectivity check for performance purpose 2019-10-21 19:04:27 +10:00
dragonpilot 09e9f25c29 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-21 16:20:46 +10:00
dragonpilot 344dfa9bca add 2019 Lexus ES200 port from Shell 2019-10-21 16:20:04 +10:00
dragonpilot d3b7d741af remove gas/brake value modification when allow_gas is enabled 2019-10-21 11:18:17 +10:00
dragonpilot ce54902f69 disable internet connection checking 2019-10-21 11:11:51 +10:00
Riccardo 4fd5034aff Remove unneded use of replace, causing json to fail loading the alert 2019-10-18 11:29:59 -07:00
dragonpilot 4b962fef63 Add Lead Car Moving Alert 2019-10-18 17:58:12 +10:00
dragonpilot c61ee95eec Make sure always use unsigned panda firmware 2019-10-18 09:47:14 +10:00
dragonpilot b5fb96455d adjust STEER_ANGLE to 0.0573 instead of 0.573 2019-10-18 09:41:09 +10:00
dragonpilot e8c31261c8 Merge branch 'devel-unsupported-cars' into devel-en 2019-10-18 09:39:33 +10:00
dragonpilot 608c8e46fd Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-18 09:39:19 +10:00
dragonpilot 0f8cf424ce Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-18 09:38:09 +10:00
Riccardo 9e20d79455 Update ref to process_replay regression test 2019-10-17 14:47:38 -07:00
Jason Young da1161d7d8 Add core OP support for CRC validation, with extra support for Volkswagen MQB (#836)
* Generalized core OP CRC support plus extra bits for Volkswagen MQB.
2019-10-17 13:58:32 -07:00
Riccardo 62d14b8122 Revert to using the sum of the lane line probabilities instead of the the product 2019-10-17 13:31:28 -07:00
dragonpilot 1608739cf7 Add slow on curve toggle 2019-10-17 14:22:28 +10:00
dragonpilot 3db7389eb8 fix unable to display release note issue 2019-10-17 13:35:10 +10:00
dragonpilot 7c8f42c07e update APK 2019-10-17 10:30:50 +10:00
dragonpilot 84fc30a84b Fix STEER_ANGLE in STEER_TORQUE_SENSOR factor to 0.573 (was 0.056) 2019-10-17 10:21:00 +10:00
dragonpilot fbbf03bb73 Merge branch 'devel-unsupported-cars' into devel-en 2019-10-17 10:19:50 +10:00
dragonpilot f096912cb5 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-17 10:19:13 +10:00
dragonpilot 270702f54c Fix charging_ctrl max/min value param reader 2019-10-17 09:59:13 +10:00
dragonpilot 601d0b8f1e Add DragonCarModel/DragonCarVIN params 2019-10-17 09:58:47 +10:00
dragonpilot 5416f2008e delete bs (branch switcher) 2019-10-16 17:22:21 +10:00
dragonpilot 4d8444a4aa upgrade autonavi app to v4.3.0 2019-10-16 16:10:01 +10:00
dragonpilot 4730da4911 Add no-cache header when download changelog 2019-10-16 11:57:49 +10:00
dragonpilot 24ed87e568 Add reboot to flash panda script 2019-10-16 10:36:17 +10:00
dragonpilot 3c658f93c0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-15 11:57:02 +10:00
dragonpilot f82539ddd4 Update APK 2019-10-14 17:12:13 +10:00
dragonpilot cdfab1efeb Update APK 2019-10-14 16:59:49 +10:00
dragonpilot d8501656f0 fix reset_update.sh script again 2019-10-14 16:56:08 +10:00
dragonpilot 5eea31af91 Fix update_panda_firmware.sh 2019-10-14 16:29:13 +10:00
dragonpilot 3caa71ef1b add a script for update panda firmware 2019-10-14 16:03:44 +10:00
dragonpilot ef33ef60a8 fix reset_update script 2019-10-14 16:03:31 +10:00
dragonpilot d9ac0507a3 update APK 2019-10-14 13:59:20 +10:00
dragonpilot 3cd0270878 Create a custom script for update feature 2019-10-14 13:44:06 +10:00
dragonpilot 1c03ea3b39 update APK 2019-10-14 12:32:01 +10:00
dragonpilot 7a8f3e1df3 fix charging ctrl toggle 2019-10-14 12:27:39 +10:00
rbiasini 2ea17f00cf Force subaru to assume the stock camera is connected (#849) 2019-10-13 18:25:09 -07:00
dragonpilot 3adf752f1a Display dp's changelog instead of dp's release notes 2019-10-14 11:02:12 +10:00
dragonpilot 8803683a0c remove deprecated dragon params 2019-10-13 10:58:03 +10:00
dragonpilot c37dd3ec37 re-enable updated 2019-10-13 10:36:21 +10:00
dragonpilot 30f707cf7a Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-13 10:17:34 +10:00
rbiasini 77aaead924 Allow to lock safety mode to keep gm/tesla cars supported (#844) 2019-10-11 17:35:07 -07:00
illumiN8i 8e329e1e3a 2019 Highlander Hybrid Limited Platinum (#843)
fingerprint from ogdragonzypher on Discord
2019-10-11 13:46:48 -07:00
dekerr 7ad5f4292e simplify encode/decode in dbc (#840)
* simplify encode/decode
2019-10-11 13:22:16 -07:00
dekerr a7bfa413ae use list comprehension (#839)
* use list comprehension

* oops index range fix
2019-10-11 00:09:59 -07:00
eFini b773d54460 Increase LEXUS_IS safetyParam to 77 (#841) 2019-10-10 23:31:05 -07:00
dragonpilot 7f3f07e04e Merge branch 'devel-unsupported-cars' into devel-en 2019-10-11 14:24:04 +10:00
dragonpilot a1abe13da0 Add Taiwan 2019 RAV4 FP from Max Duan / CloudJ 2019-10-11 14:23:43 +10:00
dragonpilot e55fd7ae4b Merge branch 'devel-unsupported-cars' into devel-en 2019-10-11 14:17:06 +10:00
dragonpilot d855a70690 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-11 14:14:35 +10:00
dragonpilot 400889ce65 Fix fp cache issue 2019-10-11 13:44:16 +10:00
dragonpilot 2b706c4335 Fix FP cache 2019-10-11 12:16:18 +10:00
dragonpilot 62cbbb2845 Revert "Fixing up fp cache"
This reverts commit 6b103dac74.
2019-10-11 10:23:37 +10:00
dragonpilot fa5e8de64d Improve honda dp_allow_gas logic 2019-10-11 09:57:07 +10:00
dragonpilot 6b103dac74 Fixing up fp cache 2019-10-11 09:47:26 +10:00
dragonpilot 07b8c4b0a0 Fix python3 params.get issue in appd 2019-10-10 22:07:05 +10:00
dragonpilot 0f61fe3a44 Fix python3 params.get issue 2019-10-10 21:43:55 +10:00
dragonpilot 3efa000221 use dp spinner 2019-10-10 15:08:01 +10:00
dragonpilot 83c6eca4a1 Fix unavailable variable issue 2019-10-10 14:34:18 +10:00
dragonpilot d130c6c9a2 Fix unable to display ip address issue 2019-10-10 14:09:09 +10:00
dragonpilot 9798b12384 Update APK 2019-10-10 13:58:03 +10:00
dragonpilot b67715b480 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-10 10:44:43 +10:00
Vehicle Researcher eec9bb71c4 openpilot v0.6.5 release 2019-10-09 18:43:53 +00:00
Vehicle Researcher 703f51ed56 Merge opendbc subtree 2019-10-09 18:31:57 +00:00
Vehicle Researcher a78baac2e3 Merge panda subtree 2019-10-09 18:31:56 +00:00
Vehicle Researcher 96bdc0a043 Merge cereal subtree 2019-10-09 18:31:55 +00:00
dragonpilot d895bd6813 Merge branch 'devel-unsupported-cars' into devel-en 2019-10-09 14:46:13 +10:00
dragonpilot 55fb019272 Revert "Move Max's FP to TSS RAV4H instead of TSS2 variant"
This reverts commit fc3a9adf29.
2019-10-09 14:45:13 +10:00
dragonpilot a8da7e753c Add warning when LatCtrl is off 2019-10-09 14:43:24 +10:00
dragonpilot 1305ea2483 Add branch switch tool 2019-10-08 14:43:12 +10:00
dragonpilot 050994f673 Update APK 2019-10-08 10:49:49 +10:00
dragonpilot 79bd9d42eb Merge branch 'devel-unsupported-cars' into devel-en 2019-10-08 10:25:37 +10:00
dragonpilot fc3a9adf29 Move Max's FP to TSS RAV4H instead of TSS2 variant 2019-10-08 10:25:11 +10:00
dragonpilot 7d256852c3 Merge branch 'devel-unsupported-cars' of https://github.com/dragonpilot-community/dragonpilot into devel-unsupported-cars 2019-10-08 10:24:08 +10:00
dragonpilot 6a95cb2b06 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-08 10:23:31 +10:00
dragonpilot 74a2d08430 Remove checks = [] from devel-unsupported-cars branch 2019-10-07 21:11:20 +10:00
dragonpilot da9fddeaae Merge branch 'devel-unsupported-cars' into devel-en 2019-10-07 21:10:21 +10:00
dragonpilot 860fe53c35 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-07 21:09:11 +10:00
dragonpilot a5fe383928 move new rav4h fp to tss2 2019-10-07 21:06:11 +10:00
dragonpilot 6c87ac182c Add Taiwan RAV4H FP 2019-10-06 21:44:50 +10:00
dragonpilot f7c925871a Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-06 20:16:21 +10:00
dragonpilot 8f77246fcb Remove zorrobyte's curvature learner, it decreases turning ability 2019-10-06 20:15:21 +10:00
Chris Souers ee3aedaaea Add 2018 Civic Hatchback 1.0l CVT (European) support (#823)
* Add 2018 Civic Hatchback 1.0l CVT support

test_fingerprints returns fine
2019-10-03 14:18:30 -07:00
dragonpilot 73cc0f1283 Merge branch 'devel-unsupported-cars' into devel-en 2019-10-01 12:16:40 +10:00
dragonpilot 935191e724 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-10-01 12:16:20 +10:00
dragonpilot bfef97c7b8 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-10-01 12:15:16 +10:00
illumiN8i 3e4f64cc78 Add 2020 Corolla XSE AFS option (#821)
Frank McTank on Discord has XSE with Connectivity Package with Adaptive Front Lighting System option
2019-09-30 13:39:27 -07:00
Kishan Karunaratne 59440ba5b7 Update thermald to set ignition_seen back to False if Panda disconnected (#820) 2019-09-30 13:06:38 -07:00
dragonpilot a57a05b99d Fix missing curvature_factor val 2019-09-30 12:47:25 +10:00
dragonpilot a944f7d9ed re-activate curvature learner and upgrade it to v4 2019-09-30 11:44:20 +10:00
dragonpilot c9d8833dfe ISH to use better steer angle sensor 2019-09-30 11:42:06 +10:00
dragonpilot 1d2ea64938 Disable curvature learner 2019-09-28 16:36:39 +10:00
dragonpilot 73d6d1537a ISH to use better angle sensor 2019-09-28 16:35:04 +10:00
dragonpilot 09162309d1 Add zorrobyte's curvature learner 2019-09-27 15:11:29 +10:00
dragonpilot d927d61f85 Add ability to toggle driver monitoring 2019-09-27 15:03:22 +10:00
dragonpilot fc7bb4ea1f disable cut steering for 2s after fault 2019-09-27 14:46:12 +10:00
dragonpilot 185887db37 Make steering wheel transparent 2019-09-27 14:32:35 +10:00
dragonpilot 863d0e1c2c Better way to fix loggerd crash issue 2019-09-26 16:59:09 +10:00
dragonpilot 2c4d7a2cd4 fix boot issue if DragonEnableLogger is disabled 2019-09-26 16:50:41 +10:00
dragonpilot e22b687197 Update APK 2019-09-25 10:29:33 +10:00
dragonpilot ea472e00c3 Add blinker ui/param 2019-09-24 16:29:50 +10:00
dragonpilot 9f33903798 Make steering wheel transparent 2019-09-24 16:21:30 +10:00
dragonpilot 8cb4ff08c7 Add params to turn on/off ui lead/path/lane 2019-09-24 14:56:14 +10:00
dragonpilot 9c220ebf44 Reduce var checking to 5 secs 2019-09-23 14:52:57 +10:00
dragonpilot 4197340812 Move ip mod back to it's old location 2019-09-23 14:44:16 +10:00
dragonpilot 1880e7ebdc Update APK 2019-09-23 14:12:02 +10:00
dragonpilot b9a32d6f61 Add toyota lane departure warning toggle 2019-09-23 13:34:31 +10:00
dragonpilot ca26fe3087 Fix charging ctrl logic 2019-09-23 13:23:40 +10:00
dragonpilot d189446b68 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-23 12:36:16 +10:00
dragonpilot bb273acc28 Add Taiwan Prius 4.5 FP, by Lin Hsin Hung 2019-09-23 12:35:44 +10:00
dragonpilot 13280acb12 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-09-23 12:30:45 +10:00
dragonpilot 8d5ef40e8b Fix battery ctrl logic 2019-09-23 12:29:51 +10:00
dragonpilot 246e687ef9 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-20 15:50:21 +10:00
dragonpilot ced9202c46 Add charging control 2019-09-20 15:49:58 +10:00
dragonpilot 11555e198e Create a new service to handle greypanda gps mode 2019-09-20 15:24:33 +10:00
illumiN8i a5ebac6ede 2020 Toyota Prius Prime Limited (#813)
* 2020 Prius Prime Limited

Fingerprint for 2020 Prius Prime Limited from garglo. 86a0adcb192c9424

* Update README.md

2020 supported
2019-09-19 12:08:23 -07:00
dragonpilot d5aba9035b Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-19 16:39:35 +10:00
dragonpilot aa09e16a60 Remove greypanda mode GPS signal adjustment 2019-09-19 16:39:23 +10:00
Willem Melching 3df522b4d1 Add spinner source files (#812) 2019-09-17 12:47:30 -07:00
Riccardo 987ed000b4 Mistakenly removed Honda Fit support from README.md 2019-09-17 11:15:34 -07:00
dragonpilot eeaa355c77 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-16 14:17:22 +10:00
dragonpilot a6273f1a36 Merge branch 'devel-unsupported-cars' of https://github.com/dragonpilot-community/dragonpilot into devel-unsupported-cars 2019-09-16 14:16:04 +10:00
dragonpilot bbc3507854 Taiwan CT200h FP from CloudJ, CT200h port from thomaspich 2019-09-16 14:14:53 +10:00
dragonpilot b797a10b6e Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-09-16 13:56:56 +10:00
dragonpilot 068a481769 Fix incorrect light_stalk assignment 2019-09-14 18:16:45 +10:00
dragonpilot 9520c20c6b Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-14 18:15:41 +10:00
Willem Melching 508dc5742c Revert dPoly computation to 0.6.3 behavior (#809)
* Revert dPoly computation to 0.6.3 behavior

* update test reference
2019-09-13 17:01:54 -07:00
dragonpilot fe2a3caf51 Fix ISH error 2019-09-13 22:31:20 +10:00
dragonpilot 364aa99ccf kernel call optimization 2019-09-13 16:34:18 +10:00
dragonpilot 08bb061647 Update APK 2019-09-13 15:04:24 +10:00
dragonpilot d18f5a0b17 update UI to adapt dragon_driving_ui switch 2019-09-13 14:50:11 +10:00
dragonpilot 8452cb5d58 Add missing init value 2019-09-13 13:02:10 +10:00
dragonpilot 0a398a474e Add ability to display/hide speed in UI 2019-09-13 12:58:09 +10:00
dragonpilot 96b8b66a5a Update APK 2019-09-13 12:50:48 +10:00
dragonpilot 1d75585593 Still allow header to be displayed when dragon_driving_ui is disabled 2019-09-13 12:48:39 +10:00
dragonpilot 2fa7df9c22 Update logic so if DragonSteeringMonitorTimer set to <= 0, it will disable steering monitor by increase the value to 86400 (a day) 2019-09-13 12:35:50 +10:00
dragonpilot e932e5d0dc Update APK 2019-09-13 12:34:39 +10:00
dragonpilot 205a1f8121 Add ability to disable steering limit alert 2019-09-13 11:51:58 +10:00
dragonpilot 8b68e26b36 Update shutdownd logic - reported by loveloveses@wechat 2019-09-13 11:31:48 +10:00
dragonpilot d49bd6ac02 clean up and fix a couple errors that stop honda cars running 2019-09-13 10:05:11 +10:00
dragonpilot ebea7ebd2c Fix ISH light_stalk message location 2019-09-13 09:15:23 +10:00
dragonpilot e7c53b1a4e Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-09-12 23:02:02 +10:00
dragonpilot 7abf659b90 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-12 22:59:57 +10:00
dragonpilot 11824f2756 Add back Shell's odyssey 2019-09-12 22:58:43 +10:00
Comma Device e815923bb7 ish confirmed working 2019-09-12 21:51:53 +10:00
dragonpilot 88442f0819 supercharge ish 2019-09-12 16:19:05 +10:00
dragonpilot 1e1c3b62f5 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-12 16:14:32 +10:00
dragonpilot 97c5965c65 Add ISH into interface.py 2019-09-12 16:13:56 +10:00
dragonpilot 98444c7783 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-09-12 15:54:16 +10:00
dragonpilot b8b2ca7759 Fix up driver_monitor mod so change requires restart (less query to kernel) 2019-09-12 15:54:07 +10:00
dragonpilot d96f8b17b4 Fix up driver_monitor mod so change requires restart (less query to kernel) 2019-09-12 15:48:56 +10:00
dragonpilot beb11b88a1 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-12 15:32:57 +10:00
dragonpilot b84cef9d95 Keep ISH dbc for future reference 2019-09-12 15:32:34 +10:00
dragonpilot 762115f7f8 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-12 15:27:07 +10:00
dragonpilot db820d39d1 Update 2017 Lexus IS300h port 2019-09-12 15:26:41 +10:00
dragonpilot 6b79d5bc07 Fix up dragon_enable_driver_safety_check mod 2019-09-12 11:43:09 +10:00
dragonpilot c62aa79af7 Remove matched fingerprint logs 2019-09-11 16:20:37 +10:00
dragonpilot 089165d1b9 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-09-11 16:14:19 +10:00
dragonpilot ec73591c7a Fix local variable "dragon_lat_control" error 2019-09-11 16:13:30 +10:00
dragonpilot 192fc94fe5 Fix local variable error 2019-09-11 16:12:55 +10:00
dragonpilot 98f6903eda DP spinner 2019-09-11 12:21:34 +10:00
dragonpilot 4d95c008c5 Add unsupported cars 2019-09-11 12:00:09 +10:00
dragonpilot 0d8dbd73a6 use put_nonblocking instead of params.put 2019-09-11 11:46:31 +10:00
dragonpilot a5518a2330 更新APK 2019-09-11 11:25:19 +10:00
dragonpilot bbdcb46dc1 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-11 11:17:03 +10:00
dragonpilot d06bd5953b Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars
# Conflicts:
#	opendbc/generator/toyota/lexus_is_hybrid_2017_pt.dbc
#	opendbc/lexus_is_hybrid_2017_pt_generated.dbc
#	selfdrive/car/toyota/carstate.py
#	selfdrive/car/toyota/interface.py
#	selfdrive/car/toyota/values.py
2019-09-11 11:16:41 +10:00
dragonpilot df694ca719 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
#	cereal/car.capnp
#	opendbc/generator/toyota/lexus_is_hybrid_2017_pt.dbc
#	opendbc/lexus_is_hybrid_2017_pt_generated.dbc
#	panda/board/safety/safety_honda.h
#	selfdrive/car/car_helpers.py
#	selfdrive/car/honda/values.py
#	selfdrive/car/toyota/carstate.py
#	selfdrive/car/toyota/interface.py
#	selfdrive/car/toyota/values.py
#	selfdrive/controls/lib/driver_monitor.py
#	selfdrive/controls/lib/lane_planner.py
#	selfdrive/locationd/paramsd.cc
#	selfdrive/ui/ui.c
2019-09-11 11:08:35 +10:00
Willem Melching a64d4f7cca Driver monitoring fix when face is visible briefly during nighttime (#806) 2019-09-10 17:35:40 -07:00
dragonpilot aee19a87eb Add ability to disable driving UI 2019-09-11 10:33:52 +10:00
Vehicle Researcher 57b54d6a8a openpilot v0.6.4 release 2019-09-09 23:03:02 +00:00
Vehicle Researcher 797644ded1 Merge opendbc subtree 2019-09-09 23:00:24 +00:00
Vehicle Researcher b358137f1d Merge panda subtree 2019-09-09 23:00:23 +00:00
Vehicle Researcher cbf2c4e08a Merge cereal subtree 2019-09-09 23:00:20 +00:00
dragonpilot 67fde00df2 Fix GreyPandaMode logic 2019-09-09 14:25:07 +10:00
dragonpilot 2385b2c981 Add DragonGreyPandaMode logic 2019-09-09 14:17:24 +10:00
dragonpilot 3986b37de0 更新APK 2019-09-09 12:56:48 +10:00
dragonpilot 5ffacb58ae 加入 GreyPandaMode 2019-09-05 15:33:12 +10:00
dragonpilot 0c1f24d48b Merge branch 'devel-unsupported-cars' into devel-en
# Conflicts:
#	selfdrive/car/honda/values.py
2019-09-05 11:16:11 +10:00
dragonpilot 420141f46c 加入 Honda Accord Hybrid China 2019-09-05 11:15:07 +10:00
dragonpilot 0bc81f9ace Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-05 11:12:00 +10:00
dragonpilot 93e3c9d725 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-09-05 11:11:39 +10:00
dragonpilot 1bbe8389db 加入 Honda Inspire Hybrid 2019-09-05 11:09:38 +10:00
heitikender 0b0968dc38 Update values.py (#797)
changed Lexus ES DBC scheme to hybrid_tss2, since this is the correct one. Tested on car, works.
2019-09-04 13:38:52 -07:00
dragonpilot 79d38db009 打開 GPS 高精確度定位模式 2019-09-04 15:37:40 +10:00
dragonpilot 85a70c096a Merge branch 'devel-unsupported-cars' into devel-en 2019-09-04 14:40:13 +10:00
dragonpilot d13c6cc6b3 加入 2019 Taiwan Altis Hybrid (需確認) 2019-09-04 14:39:52 +10:00
dragonpilot d9f9d439b4 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-04 14:28:51 +10:00
dragonpilot 983ab3001c use PR values 2019-09-04 14:28:14 +10:00
dragonpilot f1329f043e restore files deleted accidentally 2019-09-04 14:26:39 +10:00
dragonpilot e9df97064d Merge branch 'devel-lexus-ish-ave30r' of https://github.com/efinilan/openpilot into devel-unsupported-cars
# Conflicts:
#	selfdrive/car/toyota/values.py
2019-09-04 14:22:11 +10:00
dragonpilot 25a76581e6 Merge branch 'devel-unsupported-cars' into devel-en 2019-09-04 14:17:59 +10:00
dragonpilot deb7e30b6f 加入台灣 2019 Altis 指紋 2019-09-04 14:16:56 +10:00
dragonpilot 720ceff07e Merge branch 'devel' of https://github.com/commaai/openpilot into devel-unsupported-cars 2019-09-04 14:09:33 +10:00
dragonpilot 18064840c4 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-09-04 12:23:21 +10:00
dragonpilot f9a9b1ddf9 increase sensor_data_age and posenet_invalid_count in paramsd.cc to reduce errors (perhaps caused by additional loads?) 2019-09-02 15:35:01 +10:00
dragonpilot 03a00ccf45 修正 logic 2019-09-02 14:45:25 +10:00
dragonpilot 734b0b295a 加入延遲開啟/關閉 APP 2019-09-02 13:24:07 +10:00
dragonpilot 972e0a7de1 顯示WIFI IP 位置 2019-09-02 11:47:57 +10:00
dragonpilot 1003213bd1 優化 2019-08-30 17:20:07 +10:00
dragonpilot 0573aa7cea Revert "加入電池充電保護"
This reverts commit 4151d152
2019-08-30 15:17:45 +10:00
dragonpilot 5992179d68 Revert "更新APK"
This reverts commit 80a88170
2019-08-30 15:17:34 +10:00
dragonpilot a139677386 Revert "修正"
This reverts commit 80e24f20
2019-08-30 15:17:27 +10:00
dragonpilot db45c6c91b Revert "update logic"
This reverts commit d45a88d5
2019-08-30 15:17:17 +10:00
dragonpilot e081975298 update logic 2019-08-30 14:13:52 +10:00
dragonpilot dd0b95689d 修正 2019-08-30 13:56:36 +10:00
dragonpilot e3d3c20ebb 更新APK 2019-08-30 13:35:34 +10:00
dragonpilot 0df46ccd55 加入電池充電保護 2019-08-30 13:24:07 +10:00
dragonpilot d66a01fc98 更新APK 2019-08-30 12:01:17 +10:00
dragonpilot afc7f88566 優化服務 2019-08-30 12:00:36 +10:00
Ted Slesinski 25d90b69dc Update README.md (#795)
Honda Fit can be removed from community-maintained branches now.
2019-08-28 12:51:31 -07:00
dragonpilot c1a78bd98b 更新APK 2019-08-28 16:19:35 +10:00
dragonpilot f23adbffed 修正錯誤 2019-08-28 16:08:21 +10:00
dragonpilot caec02ac5e 修正錯誤 2019-08-28 16:04:49 +10:00
dragonpilot 7ca22104d8 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-08-28 11:15:42 +10:00
dragonpilot 79e031b0f5 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en
# Conflicts:
#	selfdrive/ui/ui.c
2019-08-28 11:15:33 +10:00
dragonpilot 4f98316c45 修改音量調整 logic 2019-08-28 11:10:47 +10:00
dragonpilot c03ed0e02c 修改音量調整 logic 2019-08-28 09:50:16 +10:00
Ted Slesinski 9e3ff30c0c Adds 2018 Honda Fit support (#266)
* Fit rebased on latest devel

* Added new objects for fit to values.py

* Update readme

* Updated formatting of fingerprint to match others

* Update cargo variable

Co-Authored-By: Pramuditha Aravinda <pramudithaa@zone24x7.com>

* Added tire stiffness, renamed PID kp/ki variables

Co-Authored-By: Pramuditha Aravinda <pramudithaa@zone24x7.com>

* Renamed longitudinal KpBP

Co-Authored-By: Pramuditha Aravinda <pramudithaa@zone24x7.com>

* Renamed longitudinal kpV

Co-Authored-By: Pramuditha Aravinda <pramudithaa@zone24x7.com>

* Renamed longitudinal KiBP variable

Co-Authored-By: Pramuditha Aravinda <pramudithaa@zone24x7.com>

* Renamed longitudinal KiV

Co-Authored-By: Pramuditha Aravinda <pramudithaa@zone24x7.com>

* Set more realistic value for tire stiffness

* CR-V Hybrid doc duplicate
2019-08-27 15:19:25 -07:00
dragonpilot 0e6c5775e4 修正錯誤 2019-08-27 17:24:48 +10:00
dragonpilot b35cd304b0 修正錯誤 2019-08-27 17:21:45 +10:00
dragonpilot 70b2222ede 加入可調警示音量 2019-08-27 17:13:12 +10:00
dragonpilot 96330c25ce 自動關機改為可調時長 2019-08-27 11:49:00 +10:00
Rick Lan 9fa2a47525 Adjust SafetyParam to 100 as it can do 130 2019-08-26 13:47:02 +10:00
Rick Lan 106f43287e Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/car/toyota/carstate.py
#	selfdrive/car/toyota/interface.py
#	selfdrive/car/toyota/values.py
2019-08-26 13:42:00 +10:00
dragonpilot 6009c36423 Revert "Add support to 2017 Lexus is300h (AVE30R)"
This reverts commit c187ea59
2019-08-26 13:34:46 +10:00
dragonpilot 8621334d76 Add support to 2017 Lexus is300h (AVE30R) 2019-08-26 13:33:30 +10:00
wocsor d4651fcc79 Update Readme - Avalon and Sienna are now supported (#789)
and 2020 CorollaH and 2020Rav4H are on the way with VINPrinting!
2019-08-22 08:49:38 -07:00
dragonpilot 1b75ac55ac permission 2019-08-23 01:25:31 +10:00
dragonpilot 891d417f7c 修正 appd 2019-08-23 01:22:18 +10:00
dragonpilot 57411524ff 修正permission 2019-08-23 01:10:07 +10:00
dragonpilot e509158e18 優化appd 2019-08-23 00:59:57 +10:00
dragonpilot b2b06e8a48 優化appd 2019-08-23 00:55:49 +10:00
dragonpilot cb5883d57b 更新APK 2019-08-23 00:36:55 +10:00
dragonpilot f6868275d2 調整camera_offset 單位 2019-08-22 18:05:16 +10:00
dragonpilot 05479c4b7d 加入調整相機偏移距離 2019-08-22 16:25:23 +10:00
dragonpilot 06f47c1352 更新APK 2019-08-22 15:56:00 +10:00
dragonpilot 5c8114ef73 調整appd logic 2019-08-21 23:57:29 +10:00
dragonpilot 3bb4af65ae 調整appd logic 2019-08-21 23:30:53 +10:00
dragonpilot d022449502 更新3rd Party APP 管理 2019-08-21 17:42:40 +10:00
dragonpilot 46f4e0ac0a 讓第三方APK 不要每次開機都重新安裝 2019-08-21 13:01:27 +10:00
dragonpilot 1fdf2d59b7 更新APK 2019-08-21 12:35:38 +10:00
dragonpilot a1e0ba73c9 車子啟動後強迫關閉 mixplorer 2019-08-21 12:32:42 +10:00
dragonpilot 8f4281a10f 加入 mixplorer 2019-08-21 12:18:17 +10:00
dragonpilot b6e97ad135 修正DragonSteeringMonitorTimer 錯誤 2019-08-20 16:21:17 +10:00
dragonpilot f07e24cba4 修正DragonSteeringMonitorTimer 錯誤 2019-08-20 15:56:06 +10:00
dragonpilot a3e914ec7a Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-08-20 15:53:51 +10:00
dragonpilot 1d498095aa 加入可設定的 steering monitor timer 2019-08-20 12:46:07 +10:00
dragonpilot 249c6512bb 駕駛監控改至30 分鐘 2019-08-19 21:30:42 +10:00
dragonpilot c094c53b30 阻止tomtom/autonavi 過熱時使用 2019-08-19 16:45:12 +10:00
dragonpilot bd2c65ea6d 讓tomtom/autonavi 在起動時自動啟動,熄火時自動關閉 2019-08-19 15:26:21 +10:00
dragonpilot 81836bba3f 修正 honda lat ctrl 關閉時會 trigger steerSaturated 錯誤 2019-08-19 14:26:03 +10:00
dragonpilot 99eec0aa47 semibold 字型改 medium 2019-08-19 12:48:49 +10:00
dragonpilot 47a0a48f0c semibold 字型改 medium 2019-08-19 12:48:32 +10:00
dragonpilot 6b0701c5f9 把loading dragonpilot 改成網址 2019-08-19 12:25:34 +10:00
dragonpilot 197143d3b7 revert 刪除字型 2019-08-19 12:11:38 +10:00
dragonpilot 816bc9d4ca UI 移除MIUI 字型 2019-08-19 12:09:39 +10:00
dragonpilot 16992bfb15 更新APK 2019-08-19 11:49:48 +10:00
dragonpilot 862c5507a1 spinner 改用 dp 圖示 2019-08-19 11:20:47 +10:00
dragonpilot c209d38d92 關閉 tooDistracted 錯誤,以防 dp 無法啟動 2019-08-19 10:30:03 +10:00
dragonpilot d900c8e9b2 行車介面改用NotoSansCJK 字型 2019-08-15 17:15:51 +10:00
dragonpilot 52bfd679ad BBUI 轉向顯示至小數點第一位 2019-08-15 15:55:00 +10:00
dragonpilot d31713a4a8 加入 persist.sys.local 設置 2019-08-15 15:37:39 +10:00
dragonpilot 7b8a2043b9 每次開機後都會把 locale 設定成指定的語系 2019-08-15 15:15:09 +10:00
dragonpilot c58f2a817c Revert "加入特斯拉音效"
This reverts commit 5772b681
2019-08-14 13:57:54 +10:00
dragonpilot c4765f9aef 修正開機啟動 autonavi 的錯誤 2019-08-14 12:06:42 +10:00
dragonpilot 255505e532 在 frame 之後再開啟 tomtom/autonavi 2019-08-14 12:03:45 +10:00
dragonpilot 675801948e 加入開機啟動TOMTOM/AUTONAVI 功能 2019-08-14 11:53:59 +10:00
dragonpilot 25634cc2a0 關閉 updated 2019-08-14 11:14:59 +10:00
dragonpilot 1e0f989d3f 延遲 params check 至3秒以減少 kernel calls 2019-08-14 10:31:51 +10:00
dragonpilot 1c43aefada 調整 DragonEnableDriverSafetyCheck Logic 2019-08-14 10:28:58 +10:00
dragonpilot afbe7830a3 加入特斯拉音效 2019-08-14 10:26:50 +10:00
dragonpilot 02f04dd953 更新APK 2019-08-13 16:56:26 +10:00
dragonpilot 2156e48aa9 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
#	cereal/car.capnp
#	selfdrive/car/honda/carcontroller.py
#	selfdrive/car/honda/hondacan.py
#	selfdrive/car/toyota/carcontroller.py
#	selfdrive/controls/lib/driver_monitor.py
#	selfdrive/controls/lib/model_parser.py
#	selfdrive/ui/ui.c
2019-08-13 14:15:05 +10:00
Vehicle Researcher dac25e5a14 openpilot v0.6.3 release 2019-08-13 01:36:45 +00:00
Vehicle Researcher 13e3783327 Merge opendbc subtree 2019-08-13 01:34:24 +00:00
Vehicle Researcher 80eb52d1dd Merge panda subtree 2019-08-13 01:34:23 +00:00
Vehicle Researcher 96442bc9e1 Merge cereal subtree 2019-08-13 01:34:22 +00:00
dragonpilot d56f690432 更新 APK 2019-08-12 22:58:08 +10:00
dragonpilot b6a6fea700 加入導航 2019-08-12 22:00:05 +10:00
dragonpilot 88a47b0a96 Merge branch 'devel-en' into devel-en-unsupported-cars 2019-08-11 02:01:13 +10:00
dragonpilot a6088fd3e9 加入新的指紋 2019-08-11 01:58:11 +10:00
dragonpilot a22b600496 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-08-06 15:43:06 +10:00
Dragonpilot 06a4ca837e 回傳指紋到 sentry.io 2019-08-02 09:18:07 +10:00
Dragonpilot a0e5e385d7 修改指紋暫存 logic 2019-08-02 09:17:14 +10:00
Dragonpilot 51069dc41e 嘗試更新指紋暫存 2019-08-02 08:53:24 +10:00
Riccardo f72db32d6e Revert "Revert "Update hyundaican for Correct Message ID on LKAS11 (#746)" (#775)"
This reverts commit 5d1e7ddbc2.
2019-08-01 12:44:41 -07:00
TK211X 97bfc183ef Correct Message ID on LKAS11 under Openpilot .dbc (#747)
https://github.com/commaai/opendbc/pull/172
2019-08-01 12:43:49 -07:00
rbiasini 5d1e7ddbc2 Revert "Update hyundaican for Correct Message ID on LKAS11 (#746)" (#775)
This reverts commit 958f69608c.
2019-08-01 12:35:24 -07:00
TK211X 958f69608c Update hyundaican for Correct Message ID on LKAS11 (#746)
This is the only trace of CF_Lkas_Icon found under /car/hyundai relative to open .dbc

https://github.com/commaai/opendbc/pull/172
2019-08-01 12:34:19 -07:00
Dragonpilot b83d573701 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-08-01 11:30:03 +10:00
Dragonpilot e67b0094b0 更新 APK 2019-08-01 11:29:38 +10:00
Dragonpilot 11f1f9e5a7 加入 UI 設定 2019-08-01 11:28:59 +10:00
Willem Melching 81a1601f3c Fix timeout in longitudinal test (#772)
* Fix timeout in longitudinal test
2019-07-31 18:17:19 -07:00
Dragonpilot 2fafc81e06 加回指紋暫存 2019-08-01 09:25:46 +10:00
Dragonpilot a31e196205 Revert "移除指紋暫存"
This reverts commit 89574f5c7a.

Conflicts:
	apk/ai.comma.plus.offroad.apk
2019-08-01 09:14:19 +10:00
dragonpilot 02644ab02a dragon_toyota_stock_dsu 模式下只在適當的情況下 pcm_acc_active 才設成 True 2019-07-31 22:34:29 +10:00
dragonpilot 3bad9f3136 原廠 LKAS 只在關閉下觸發,不然會有 steering error 2019-07-31 22:31:52 +10:00
Dragonpilot 534fb98c35 更新 APK 2019-07-31 15:44:27 +10:00
Dragonpilot 624ac8bd8c 加入 Lat 控制開關,Toyota/Lexus 原廠 LKAS 模式 2019-07-31 15:27:16 +10:00
Dragonpilot 7e8a0d2413 更新 APK 2019-07-31 11:25:35 +10:00
Dragonpilot 89574f5c7a 移除指紋暫存 2019-07-31 11:25:15 +10:00
Dragonpilot 0a90614301 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
#	selfdrive/car/car_helpers.py
2019-07-31 11:02:42 +10:00
Vehicle Researcher 9e22d17b0e openpilot v0.6.2 release 2019-07-30 02:27:48 +00:00
Vehicle Researcher 9b898a9365 Merge opendbc subtree 2019-07-30 02:25:29 +00:00
Vehicle Researcher 346fa152f9 Merge panda subtree 2019-07-30 02:25:28 +00:00
Vehicle Researcher ad29964e18 Merge cereal subtree 2019-07-30 02:25:27 +00:00
Chris Souers 53b0e3b6ac Update README.md (#766) 2019-07-29 15:06:34 -07:00
Dragonpilot d6898b1245 優化 params.get 讀取次數,最快每秒讀一次 2019-07-29 15:03:53 +10:00
Dragonpilot 2014a651f5 fix logic 2019-07-29 14:09:39 +10:00
Dragonpilot c73cbdd69e 更新 APK 2019-07-29 13:57:30 +10:00
Dragonpilot 4b54ecdf2f 加入 Toyota/Lexus 原廠 DSU 模式 2019-07-29 13:26:30 +10:00
Dragonpilot bfda984aa1 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-07-29 10:39:19 +10:00
Dragonpilot 5a7da65049 更新 crash.py 讓它能回傳更多訊息 2019-07-29 10:39:06 +10:00
dragonpilot d12b26a2ed Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-07-28 10:22:20 +10:00
Rick Lan 2e766dd0db comment out unused var (causing panda flash error?) 2019-07-28 10:17:31 +10:00
Dragonpilot 3e30f8eb36 更新 APK 2019-07-26 15:02:00 +10:00
Dragonpilot 7bf0e245c6 更新變數名 2019-07-26 14:50:45 +10:00
Dragonpilot cf43256b1d Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into devel-en 2019-07-26 12:01:48 +10:00
Dragonpilot 52e564a4d4 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-07-26 12:01:06 +10:00
Gernby 15562775d8 Remove offset from curvature (#761) 2019-07-25 15:00:50 -07:00
dragonpilot 34f2b3404f 更新 APK 2019-07-25 22:22:06 +10:00
dragonpilot 7984d3dc8c 更新 APK 2019-07-25 21:59:11 +10:00
dragonpilot a4031262d9 Merge pull request #7 from eFiniLan/dp-bbui
加入 BBUI
2019-07-25 21:40:59 +10:00
Rick Lan 61d2b7d151 Merge branch 'devel-en' of https://github.com/dragonpilot-community/dragonpilot into dp-bbui
# Conflicts:
#	common/params.py
#	selfdrive/dragonpilot/dragonconf/__init__.py
2019-07-25 21:13:59 +10:00
Rick Lan 34beaeecd3 finalise BBUI 2019-07-25 21:03:47 +10:00
Rick Lan 747bb5a5e0 bbui mod 2019-07-25 17:27:58 +10:00
Arne Schwarck 0051c8a6f7 self.poller not used (#759)
I do not see the need for zmq and the poller being initialized and not used.
2019-07-24 11:45:53 -07:00
dragonpilot bf5d68dae6 Make it always write new cache fp 2019-07-24 00:28:31 +10:00
Dragonpilot 95abf32e32 加入 DragonAllowGas 功能 2019-07-23 15:51:45 +10:00
Dragonpilot e8acd2a969 加入 DragonAllowGas 功能 2019-07-23 15:40:30 +10:00
Dragonpilot b15a4c7435 取消自動更新 2019-07-23 12:10:46 +10:00
Dragonpilot 7d795f4dca 更新 APK 2019-07-23 12:07:34 +10:00
Dragonpilot e764548702 更新 APK 2019-07-23 10:56:10 +10:00
Dragonpilot e3bb1a9f05 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
#	cereal/car.capnp
#	selfdrive/car/car_helpers.py
#	selfdrive/car/toyota/interface.py
#	selfdrive/controls/lib/driver_monitor.py
#	selfdrive/manager.py
2019-07-23 10:55:28 +10:00
Vehicle Researcher e3a266863d openpilot v0.6.1 release 2019-07-22 19:17:47 +00:00
Vehicle Researcher 11f0915771 Merge opendbc subtree 2019-07-22 19:15:28 +00:00
Vehicle Researcher ef8305d13d Merge panda subtree 2019-07-22 19:15:27 +00:00
Vehicle Researcher 86063b41dd Merge cereal subtree 2019-07-22 19:15:25 +00:00
Dragonpilot 18125068e3 fix missing variables 2019-07-22 16:37:41 +10:00
Dragonpilot 6a284fc24c Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en 2019-07-22 16:10:24 +10:00
Dragonpilot 62afb42240 更新 APK 2019-07-22 16:10:06 +10:00
Dragonpilot 99b5ec04d2 Merge branch 'devel-disable-uploader' into devel-en 2019-07-22 15:39:01 +10:00
Dragonpilot 17effeff51 加入取消上傳comma ai記錄功能 2019-07-22 15:28:43 +10:00
rbiasini 4419fdc0df Use standard steer angle sensor in DSU-less pre-TSS2 Toyota. (#751) 2019-07-20 23:21:50 -07:00
Dragonpilot 80a5544bf2 Revert "把accordh 的指紋往上移"
This reverts commit 6c23abac48.
2019-07-16 15:43:35 +10:00
Dragonpilot 6c23abac48 把accordh 的指紋往上移 2019-07-16 15:22:52 +10:00
Dragonpilot 52adf9d190 更新 ACCORDH 指紋,支援 2019 版 2019-07-16 14:28:20 +10:00
Dragonpilot 2ee5cb849a 移除 safeguardd 服務 2019-07-16 11:26:59 +10:00
ErichMoraga afd2b9f6d9 Added 2019 Toyota Highlander (#739)
Tested latest commit on ICE version, and it worked flawlessly out of box.  Fantastic experience.
2019-07-15 09:55:51 -07:00
Dragonpilot c21ff40343 更新 APK 2019-07-15 11:42:24 +10:00
Dragonpilot 904ef92505 Merge branch 'devel-en' of https://github.com/dragonpilot/dragonpilot-dev into devel-en
# Conflicts:
#	apk/ai.comma.plus.offroad.apk
2019-07-15 11:18:37 +10:00
Dragonpilot 5922f488d7 更新 APK 2019-07-15 11:17:23 +10:00
dragonpilot 1253f1eebb 加入 pickle.loads 讀取暫存資料 2019-07-13 22:45:34 +10:00
dragonpilot 99be18e32f Merge branch 'devel' of https://github.com/commaai/openpilot into devel-en
# Conflicts:
#	selfdrive/controls/lib/model_parser.py
2019-07-13 22:37:57 +10:00
Riccardo a94ef2cacd Improve Toyota Highlander tuning from https://github.com/commaai/openpilot/pull/690 2019-07-12 19:24:35 -07:00
eFini d7878df3da add loggered, gpsd, sensord to gitignore (#735) 2019-07-12 11:02:23 -07:00
Gernby 7ad0d8ca45 Fix lane centering with single lane line (#737) 2019-07-12 10:55:34 -07:00
dragonpilot 4b5b49756d 更新APK 2019-07-12 20:56:17 +10:00
dragonpilot c4159ba7a0 修正暫存指紋錯誤 2019-07-12 20:22:23 +10:00
eFini 4db632d669 fix spacing in toyota/carstate.py (#736) 2019-07-11 21:22:02 -07:00
Dragonpilot 3d7c8e5795 更新 APK 2019-07-12 13:54:24 +10:00
Dragonpilot 26cbf76312 更新 APK 2019-07-12 13:22:59 +10:00
Dragonpilot 92fc4c8aa1 方向燈取消方向盤控制開啟時顯示提示訊息 2019-07-12 12:08:16 +10:00
dragonpilot 4bde16547e Merge pull request #5 from eFiniLan/dragonpilot-cache-fp
加入暫存指紋功能
2019-07-12 09:47:38 +10:00
dragonpilot 0cee9d388a Merge pull request #4 from eFiniLan/dragonpilot-dev-lkmod
加入 honda 的 Lane Keeping 模式開關
2019-07-12 09:47:07 +10:00
Rick Lan eef175d247 更新參數名 2019-07-12 09:35:05 +10:00
Rick Lan 2b44c2fe3d 將數值分開儲存 2019-07-12 09:16:49 +10:00
Rick Lan ff3145215e use pickle instead of repr 2019-07-11 16:30:06 +10:00
Rick Lan 03cbdb3fae Merge branch 'dragonpilot-dev-en' of https://github.com/dragonpilot/dragonpilot into dragonpilot-cache-fp
# Conflicts:
#	common/params.py
#	selfdrive/dragonpilot/dragonconf/__init__.py
2019-07-11 16:28:52 +10:00
Rick Lan d91c191854 make car fingerprint cacheable 2019-07-11 15:40:12 +10:00
Rick Lan 5ab145d968 remove unnecessary changes 2019-07-11 11:21:46 +10:00
Dragonpilot a8ac2023d5 Merge branch 'devel' into dragonpilot-dev-en 2019-07-11 10:52:24 +10:00
Rick Lan b35e861262 add alerts for lkmode 2019-07-11 10:16:46 +10:00
Rick Lan e355fde8bf add alerts for lkmode 2019-07-11 10:11:16 +10:00
Rick Lan 9006734293 Merge branch 'dragonpilot-dev' of https://github.com/dragonpilot/dragonpilot into dragonpilot-dev-lkmod 2019-07-11 09:35:00 +10:00
Rick Lan cc85c30c4f 修正打方向燈取消方向盤控制結束後產生的錯誤 2019-07-11 09:14:26 +10:00
Rick Lan b41741136d 更新 APK 2019-07-10 16:26:35 +10:00
Rick Lan b356d39779 修正Noctua模式 2019-07-10 15:26:14 +10:00
Rick Lan ffba451dce 修正Noctua模式 2019-07-10 15:22:25 +10:00
Rick Lan c283b71b42 加入Noctua模式 2019-07-10 15:11:09 +10:00
Rick Lan 5016d5bd58 修正關閉記錄功能 2019-07-10 14:10:53 +10:00
Rick Lan 454cfc929b 加入關閉記錄選項 2019-07-10 11:25:44 +10:00
Rick Lan 72bfd147f3 fix issue after merge 2019-07-10 09:59:51 +10:00
Rick Lan 74cbb6fde3 update to 0.6 2019-07-10 09:51:52 +10:00
Nick Brown 99a96a99bc 2019 Rav4 Limited AWD (#732)
* Fingerprint

* Merge Limited and XLE fingerprint because they're the same
2019-07-08 17:02:59 -07:00
dekerr affbdfafcd Refactor default Civic params (#720)
* move civic params out

* fix variable name

* simplify ford scaling

* cleanup

* remove import dependency

* requested changes

* keep hyundai
2019-07-08 16:59:32 -07:00
Rick Lan 87de29ee47 lkmod from honda 2019-07-04 15:02:27 +10:00
Willem Melching 28419d09da Fix run_docker_tests.sh (#730) 2019-07-03 15:53:49 -07:00
Willem Melching c1e2a1e9be Make build deterministic and do not rebuild on release2 (#729)
* sort dbc files to make linking deterministic

* touch all files on release2 checkout to prevent rebuild
2019-07-03 12:25:35 -07:00
Rick Lan 86425f095b Merge branch 'dragonpilot-dev' of https://github.com/dragonpilot/dragonpilot into dragonpilot-dev 2019-07-03 15:21:35 +10:00
dragonpilot 41a95a64f0 Merge pull request #1 from eFiniLan/dragonpilot-dev
Dragonpilot 客制功能
2019-07-03 14:04:24 +10:00
Rick Lan e60fa6453c 啟動畫面文字改為 dragonpilot 2019-07-03 13:50:00 +10:00
Rick Lan 15c9e398f1 Revert "啟動畫面文字改成 dragonpilot"
This reverts commit 0992311f
2019-07-03 13:49:18 +10:00
Rick Lan 7e560cef77 啟動畫面文字改成 dragonpilot 2019-07-03 13:48:32 +10:00
Rick Lan 31a83f69a6 調整UI 顯示 N/A 時使用的字數 2019-07-03 13:44:07 +10:00
Rick Lan 8783c5fd71 加入 dragonpilot offroad apk 2019-07-03 13:41:43 +10:00
Rick Lan bd6c37dcaa 修正錯誤 2019-07-03 13:35:08 +10:00
Rick Lan d8d4dcbda0 當轉向燈暫停方向控制功能開啟時,我們在方向燈關閉後一秒取回控制 2019-07-03 13:27:37 +10:00
Rick Lan 04863474d2 Merge branch 'dragonpilot-dev' of https://github.com/eFiniLan/openpilot into dragonpilot-dev 2019-07-03 12:43:21 +10:00
Rick Lan f41a49132f 修正 dashcamd 和 safetyguard 邏輯 2019-07-03 12:41:53 +10:00
Riccardo 6afa454543 Chrysler Pacifica 2018 Hybrid: fix fingerprint 2019-07-02 15:24:51 -07:00
Riccardo 500c8ad2af Chrysler Pacifica 2018 Hybrid: add fingerprint 2019-07-02 11:45:24 -07:00
Rick Lan 47294b083f 修正 dashcamd 和 safeguardd 無法啟動的錯誤 2019-07-02 22:50:24 +10:00
Rick Lan ac443ea42f 更改 safetycheck 預設值 2019-07-02 16:25:46 +10:00
Rick Lan c21c824010 dragonconf 改至 apk 2019-07-02 16:19:22 +10:00
Rick Lan 7b3cab409a 修正參數名,將自動關機設定單位換成分鐘,修正dragonconf logic 2019-07-02 16:17:01 +10:00
Rick Lan c9bf25b937 重新命名變數,apk 不支援 underscore 2019-07-02 12:57:22 +10:00
Rick Lan 54da0f0fb9 remove unneeded changes 2019-07-02 11:21:56 +10:00
Rick Lan d5d7a46d45 remove unneeded changes 2019-07-02 11:18:21 +10:00
Rick Lan 8e6f4e5200 remove unneeded changes 2019-07-02 11:15:51 +10:00
Rick Lan 4e1518c90a revert safety_toyota.h change 2019-07-02 11:11:37 +10:00
Rick Lan d55c7ef173 移除油門不取消 OP 選項 2019-07-02 11:04:36 +10:00
Rick Lan d8665f682b Merge branch 'devel' of https://github.com/commaai/openpilot into dragonpilot-dev
# Conflicts:
#	panda/board/safety/safety_toyota.h
#	selfdrive/car/honda/interface.py
#	selfdrive/controls/lib/model_parser.py
#	selfdrive/ui/ui.c
2019-07-02 10:13:33 +10:00
Rick Lan d79c10c022 修正 toyota d_allowGasOnOP,移除 panda 檢測 gas/brake 2019-07-02 10:02:52 +10:00
George Hotz 5077378c1c Merge pull request #716 from dekerr/readme
Update README
2019-07-01 14:15:34 -07:00
Willem Melching 7265e635b9 Exclude tools from linter (#718)
* exclude tools from linter

* Exclude tools from pylint too
2019-07-01 13:14:16 -07:00
Willem Melching 76dde174d8 Install fastcluster in CI for controls tests 2019-07-01 12:16:16 -07:00
Vehicle Researcher 7b469bc8be openpilot v0.6 release 2019-06-28 21:11:30 +00:00
Vehicle Researcher bbc7de2cbd Merge pyextra subtree 2019-06-28 21:09:14 +00:00
Vehicle Researcher 23c0cd841a Merge opendbc subtree 2019-06-28 21:09:13 +00:00
Vehicle Researcher bf26f737fd Merge commit 'dba8e01e540f8b6b231be082ee6d36304aa1997d' as 'panda' 2019-06-28 21:09:12 +00:00
Vehicle Researcher 838bcaa843 Remove old panda subtree 2019-06-28 21:09:11 +00:00
Vehicle Researcher b255a0d55a Merge commit '24e096d9f0f424c22b616b43957a5fd310f4ee83' as 'cereal' 2019-06-28 21:09:10 +00:00
Vehicle Researcher bbf513839a Remove old cereal subtree 2019-06-28 21:09:09 +00:00
Rick Lan b079fa23a6 將 dragonconf 移至系統的 params, 方便將來移植到 APK 2019-06-28 15:22:34 +10:00
Rick Lan 81fbea44e4 加入油門不取消 OP 選項 2019-06-27 15:11:18 +10:00
Rick Lan afb3405654 加入轉向燈暫時取消 OP 方向盤控制選項 2019-06-27 15:11:18 +10:00
Rick Lan ef079957aa 加入 minimal UI 2019-06-27 15:11:18 +10:00
Rick Lan db500be81d 加入斷電自動關機功能 2019-06-27 15:11:18 +10:00
Rick Lan 71602b28de 加入安全檢測功能 (提示駕駛以防止 OP 在使用中突然斷開 USB) 2019-06-27 15:11:18 +10:00
Rick Lan 9a496c5a6a 加入 mediaplayer (播放音效) 2019-06-27 15:11:18 +10:00
Rick Lan 8d7f18dea9 加入完全取消駕駛監控選項 2019-06-27 15:11:18 +10:00
Rick Lan 8cd5abd0e1 調降模型路寬至 3.5m 2019-06-27 13:33:15 +10:00
Rick Lan 3580a36be3 加入 dashcam (行車記錄) 2019-06-27 13:30:33 +10:00
Rick Lan 65f19b01fa 加入 dragonconf 讀取 /data/dragonpilot.json 設定 2019-06-27 13:27:58 +10:00
Rick Lan 42effa5f4e 讓 UI 能夠顯示中文 2019-06-27 12:00:52 +10:00
Rick Lan 4b4f541455 自動安裝中文字型 2019-06-27 11:56:49 +10:00
Rick Lan 327a5d426b 修改 sentry.io 相關程式碼
* 提供更多的資訊
* 將錯誤轉發至 dragonpilot 帳號
2019-06-27 11:36:32 +10:00
dekerr 0bf3fa6bf8 remove 17 odyssey 2019-06-26 15:20:11 -04:00
eFini 402e07827c Updating existing fingerprint to support both China 2017 & 2019 CRV-H (#689)
* Fingerprint works on both China 2017 & 2019 CRV-H

* update readme
2019-06-25 14:15:38 -07:00
TrackZero 56aba899df Added fingerprint for 2019 Toyota Prius LE (#694)
* Adding fingerprint for 2019 Prius LE
2019-06-25 14:04:39 -07:00
Rick Lan 979d1e9fb4 Merge branch 'devel' of https://github.com/eFiniLan/openpilot into devel-lexus-ish-ave30r 2019-06-25 13:44:06 +10:00
Rick Lan 9f1dc4194e Merge branch 'devel' of https://github.com/eFiniLan/openpilot into devel-lexus-ish-ave30r 2019-06-25 13:42:38 +10:00
Rick Lan e8d2b3232e Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-06-24 16:24:32 +10:00
dekerr 8794ebc92f update vals (#705) 2019-06-20 12:22:30 -07:00
Willem Melching d0d631285b Deterministic boardd build (#702) 2019-06-17 15:23:03 -07:00
rbiasini c5ce0dcddd Reconcile panda pedal cancel logic for Toyota with controls (#698) 2019-06-13 17:51:12 -07:00
rbiasini 609a80ba0e Subaru re-added to the list of supported cars with with DIY giraffe (#691)
* Subaru re-added to the list of supported cars with with DIY giraffe

* Minor line break fixes
2019-06-07 18:09:29 -07:00
George Hotz d30f8e5c75 Merge pull request #679 from njbrown09/entunehotspot
Add Toyota Entune Wifi hotspot to hotspot check.
2019-06-06 23:11:43 -07:00
Rick Lan cacc7f082f Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-06-07 08:11:31 +10:00
Rick Lan f60d3290c5 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-06-07 08:10:39 +10:00
Vehicle Researcher deaad0f8fd openpilot v0.5.13 release 2019-06-06 04:38:45 +00:00
Vehicle Researcher c250fb9e0d Merge pyextra subtree 2019-06-06 04:31:54 +00:00
Vehicle Researcher 8373f5bfce Merge opendbc subtree 2019-06-06 04:31:49 +00:00
Vehicle Researcher 72f242319d Merge panda subtree 2019-06-06 04:31:46 +00:00
Nick Brown e0cf685e45 Camry Fingerprint (#647) 2019-06-05 17:56:21 -07:00
CAmaninacan1 2be290d146 Update values.py (#687)
Added fingerprint for 2019 Highlander XLE
2019-06-05 16:35:48 -07:00
Rick Lan 1a8a5dbee2 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-06-05 16:31:13 +10:00
Nick Brown 987fd0ade3 Detect toyota connected car wifi as a hotspot and not a normal home wifi network. 2019-06-02 00:18:00 -04:00
Joel Natividad e592f889c1 Correct typos (#677)
“thansk” to “thanks”
2019-06-01 17:03:10 -07:00
Willem Melching 86fb709c81 Revert "Fix registration's params get_git_remote()" (#674) 2019-05-31 17:32:43 -07:00
ChaseCares 28e4960780 Add 2019 RAV4 XLE fingerprints (#671)
* Add 2019 RAV4 XLE fingerprints
2019-05-31 16:47:07 -07:00
George Hotz 9775aa165f Merge pull request #673 from rafcabezas/devel
Fix registration's params get_git_remote()
2019-05-31 16:44:08 -07:00
Willem Melching a80b506f96 Merge pull request #669 from martinl/feature_subaru_lane_lines
Add lane lines visible indicators to Subaru dash display
2019-05-31 14:06:34 -07:00
raf e76c9b8082 Fix registration's params get_git_remote() 2019-05-31 12:10:37 -04:00
Riccardo 0f78c98629 Fingeprint script: better instructions 2019-05-28 17:12:49 -07:00
Arne Schwarck 15c3793dab Update mapd.py (#672) 2019-05-28 16:16:32 -07:00
Martin Lillepuu 0592c72ab3 Add subaru dash lane lines 2019-05-26 11:13:39 +03:00
Martin Lillepuu 744a3566d6 add Openpilot lane line indicators to Subaru LKAS HUD 2019-05-26 11:08:17 +03:00
Rick Lan 6d8e8c7661 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-05-22 20:01:38 +10:00
Chris Souers fc7e2dd630 add 19 crv to readme (#657) 2019-05-21 22:41:06 -07:00
Rick Lan 7c573c684f Fix values.py 2019-05-22 10:09:01 +10:00
Rick Lan bf70f4636b Update variable name 2019-05-22 10:07:31 +10:00
Rick Lan ce20724121 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/car/toyota/interface.py
#	selfdrive/car/toyota/values.py
2019-05-21 10:30:42 +10:00
Rick Lan 9265671d25 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-05-21 10:16:31 +10:00
Rick Lan f144e4c383 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-05-17 22:11:58 +10:00
Vehicle Researcher 9c68a385ff openpilot v0.5.12 release 2019-05-16 13:20:29 -07:00
Vehicle Researcher e11a646657 Merge opendbc subtree 2019-05-16 13:13:38 -07:00
Vehicle Researcher adb82cae81 Merge panda subtree 2019-05-16 13:13:38 -07:00
Rick Lan d961b41607 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-05-16 15:05:10 +10:00
Arne Schwarck 764a4034a2 1263: 8 for highlander hybrid (#642) 2019-05-14 00:26:16 -07:00
Rick Lan facd216835 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-05-14 12:30:46 +10:00
Nigel Armstrong 03e64e043b Add changes to 0.5.11 release notes 2019-05-09 16:42:14 -07:00
Willem Melching d29b51561b Cleanup Toyota LDW 2019-05-07 22:42:04 -07:00
Willem Melching 2548f41be8 Install newer pip version in CI (#627)
* Update pip in CI

* Longer timeout for docker build

* Increase travis timeout

* revert changes to travis file
2019-05-07 21:56:45 +02:00
Rick Lan 4c4736f99b Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-05-07 10:39:21 +10:00
Willem Melching aa482a199a add minimum score to consider a way valid (#292) 2019-05-06 13:21:34 -07:00
Arne Schwarck c04ca640bf Add lane departure warning on dashboard for Toyota (#605)
* Add lane departure alert in controlsd

* Need init values for LDA

* Add lane departure in interface.py

* Include LDA in CarControler

* Add logic for LDA in toyotacan

* Add speed condition and comments for LDA

* Correct right CS.vEgo

* Correct rPoly spelling

* Add left and rightLaneDepart to HUDControl in car.capnp

* Add left and rightLane_Depart in UI function

* set controlsd priority

* revert

* There must be a line to depart from

* Include changes from @pd0wm

* Remove redundant False allocation

leftLaneDepart and rightLaneDepart as False by default according to @pd0wm

* Modify variable names

right_lane_depart and left_lane_depart to conform with python naming convention

* Modify variable names

right_lane_depart and left_lane_depart to conform with python naming convention

* Wrap lane departure warning in one bool
2019-05-06 22:19:00 +02:00
ErichMoraga 1c730c0622 Updated Prius & Prius Prime to include 2019 (#629) 2019-05-05 20:32:05 -07:00
marcbou e1c3b01f68 correct some spelling errors (#628) 2019-05-05 03:23:32 -07:00
Riccardo bf1b47be1a Maintain Python 2-3 compatibility but use six.iteritems(). 2019-05-04 19:01:46 -07:00
Rick Lan 7dd8f9f481 revert unneeded change 2019-05-04 11:40:41 +10:00
Rick Lan a63162f5a7 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-05-04 11:36:50 +10:00
Drew Hintz c714d9c9e9 getting ready for Python 3 (#619)
* tabs to spaces
python 2 to 3: https://portingguide.readthedocs.io/en/latest/syntax.html#tabs-and-spaces

* use the new except syntax
python 2 to 3: https://portingguide.readthedocs.io/en/latest/exceptions.html#the-new-except-syntax

* make relative imports absolute
python 2 to 3: https://portingguide.readthedocs.io/en/latest/imports.html#absolute-imports

* Queue renamed to queue in python 3
Use the six compatibility library to support both python 2 and 3: https://portingguide.readthedocs.io/en/latest/stdlib-reorg.html#renamed-modules

* replace dict.has_key() with in
python 2 to 3: https://portingguide.readthedocs.io/en/latest/dicts.html#removed-dict-has-key

* make dict views compatible with python 3
python 2 to 3: https://portingguide.readthedocs.io/en/latest/dicts.html#dict-views-and-iterators
Where needed, wrapping things that will be a view in python 3 with a list(). For example, if it's accessed with []
Python 3 has no iter*() methods, so just using the values() instead of itervalues() as long as it's not too performance intensive. Note that any minor performance hit of using a list instead of a view will go away when switching to python 3. If it is intensive, we could use the six version.

* Explicitly use truncating division
python 2 to 3: https://portingguide.readthedocs.io/en/latest/numbers.html#division
python 3 treats / as float division. When we want the result to be an integer, use //

* replace map() with list comprehension where a list result is needed.
In python 3, map() returns an iterator.
python 2 to 3: https://portingguide.readthedocs.io/en/latest/iterators.html#new-behavior-of-map-and-filter

* replace filter() with list comprehension
In python 3, filter() returns an interatoooooooooooor.
python 2 to 3: https://portingguide.readthedocs.io/en/latest/iterators.html#new-behavior-of-map-and-filter

* wrap zip() in list() where we need the result to be a list
python 2 to 3: https://portingguide.readthedocs.io/en/latest/iterators.html#new-behavior-of-zip

* clean out some lint
Removes these pylint warnings:
************* Module selfdrive.car.chrysler.chryslercan
W: 15, 0: Unnecessary semicolon (unnecessary-semicolon)
W: 16, 0: Unnecessary semicolon (unnecessary-semicolon)
W: 25, 0: Unnecessary semicolon (unnecessary-semicolon)
************* Module common.dbc
W:101, 0: Anomalous backslash in string: '\?'. String constant might be missing an r prefix. (anomalous-backslash-in-string)
************* Module selfdrive.car.gm.interface
R:102, 6: Redefinition of ret.minEnableSpeed type from float to int (redefined-variable-type)
R:103, 6: Redefinition of ret.mass type from int to float (redefined-variable-type)
************* Module selfdrive.updated
R: 20, 6: Redefinition of r type from int to str (redefined-variable-type)
2019-05-02 11:08:59 -07:00
Rick Lan 2a5a458172 * change steering torque to 1600 2019-04-24 21:59:03 +10:00
Vehicle Researcher 9c26f5ec7b openpilot v0.5.11 release 2019-04-23 01:41:19 +00:00
Vehicle Researcher df25aa0a95 Merge opendbc subtree 2019-04-23 01:34:20 +00:00
Vehicle Researcher 65c42b436f Merge panda subtree 2019-04-23 01:34:19 +00:00
Nigel Armstrong 6ca53d7f6a Fix dirty flag
Git diff-index doesn't rebuild index, so files with modified dates or touched
are marked as modified with a SHA1 of all 0.

To fix this, we run update-index --refresh before diff index. Any touched
files are updated in the index.

https://stackoverflow.com/questions/36367190/git-diff-files-output-changes-after-git-status
2019-04-17 00:33:13 -07:00
Nigel Armstrong ead64d7770 Better logging of dirty files 2019-04-16 20:22:38 -07:00
Nigel Armstrong 413db08e1a Log dirty files 2019-04-16 13:50:38 -07:00
wocsor 2f7d46071d add pedal IDs to a Lexus RXH and Rav4 China (#604) 2019-04-15 18:10:13 -07:00
Nigel Armstrong 7345433d03 Add pylint to travis-ci (#595)
* Add pylint to travis-ci

* Change travis build order

* Fix missing pylint

* Add pylint to dockerfile

* Test with fixed linter for chrysler changes

* Fix linter issues in OP

* fixed linter on ford

* Fix Riccardo's comments
2019-04-12 23:12:34 -07:00
Nigel Armstrong b6e514d006 Merge panda subtree 2019-04-12 16:57:32 -07:00
Rick Lan 2a34efc31d Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-04-10 10:40:31 +10:00
eFini 9472ee91ed Add port for 2019 Honda CRV Hybrid (China ver) (#596)
* 2019 honda crv hybrid port (china version)

* adjust mass based on spec

* update mass based on spec

* add 2019 Honda CRV Hybrid
2019-04-09 17:35:57 -07:00
eFini 5669962393 Add Port for 2019 Honda Odyssey Exclusive (China version) (#592)
* Port for 2019 Honda Odyssey China ver

* update as per comments
2019-04-08 17:58:56 -07:00
dekerr 87f244b4fe remove transpose (#588) 2019-04-05 22:59:38 -07:00
Riccardo a00df10264 Chrysler: matching file in panda repo 2019-04-05 00:27:39 -07:00
Drew Hintz 8bbca86603 Add Chrysler Pacifica Hybrid 2019 (#591)
Add Chrysler Pacifica Hybrid 2019 to list of supported cars.
Clarify Jeep 2019 minimum steering speed.
2019-04-04 23:45:57 -07:00
Drew Hintz be36f71c44 📋📷 2019 Chrysler Pacifica and 2019 Jeep Grand Cherokee support (#590)
* 2019 Chrysler Pacfica and 2019 Jeep Grand Cherokee support, along with likely support for arbitrary models.
This is done by copying most values from the stock LKAS camera which is active with https://github.com/commaai/panda/pull/177

* No longer send LKAS_HEARTBIT because Panda now forwards it for us.

* Pacifica Hybrid 2018 combine fingerprints, add 808: 8

* panda chrysler: forward bus 0 to bus 2
copy of Panda commit: https://github.com/commaai/panda/commit/104950264473274e0012a39b7ea2d1468ef46d8d
2019-04-04 22:48:37 -07:00
Rick Lan 6741753643 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-04-03 14:08:39 +10:00
Gernby 21a85c421a Eliminate unnecessary temporary disengagements (#584)
This status was defined as a bump error, but it isn't actually due to bumps.  It's also triggered by driver overrides that are somewhat higher than the "steer_override" threshold.  By removing this temporary disengagement, the car is much more predictable on bumpy roads AND in turns that require assistance from the driver.
2019-04-02 00:21:23 -07:00
Nigel Armstrong a6cc298377 Update 0.5.10 Release Notes 2019-03-28 22:17:12 -07:00
Douglas Schilling Landgraf 011154ba20 patches (#582)
* selfdrive: add sys module to exit call

exit() is a helper for interactive shell. Let's explicit
use the module sys.

* selfdrive: tomstoned.py use constant for /data/tombstones/

Instead of use multiple times a string for
the data dir, use a variable.
2019-03-26 20:50:37 -07:00
Rick Lan eaf2c1894d Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-03-27 09:02:39 +10:00
Rick Lan f195f7e5fe Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-03-27 09:01:26 +10:00
Vehicle Researcher 1fca65977d openpilot v0.5.10 release 2019-03-26 01:09:18 -07:00
Vehicle Researcher 238c403df9 Merge pyextra subtree 2019-03-26 01:03:51 -07:00
Vehicle Researcher 7bb715cbe7 Merge opendbc subtree 2019-03-26 01:03:50 -07:00
Vehicle Researcher cfbc9ce733 Merge panda subtree 2019-03-26 01:03:49 -07:00
Rick Lan a602f57dc4 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-03-20 10:18:51 +10:00
Rick Lan 18cf187fda Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-03-15 11:41:20 +10:00
Rick Lan c831bf6993 move dbc files PR to opendbc repo. 2019-03-12 11:21:43 +10:00
Rick Lan 2606ba2100 fix symbol issue on checks array 2019-03-12 11:09:23 +10:00
Nigel Armstrong c8e2a6636e Add better volt fingerprint detection (#564)
Missing 578:8 causing unsupported car exception
2019-03-11 12:13:18 -07:00
Sumit Binnani eb527a4c81 Added new fingerprint for 2018 Camry Hybrid LE (#560)
* Updated Fingerprint for Camry Hybrid LE

The updated fingerprint is a superset of the previous fingerprint (maybe due to blindspot monitors).
2019-03-11 12:08:52 -07:00
arne182 2c220c87fa Add better volt fingerprint detection
Missing 578:8 causing unsupported car exception
2019-03-11 11:00:06 +01:00
srpape bc107c28ae Fix 2018 volt fingerprint (#561)
Update fingerprint and remove offending PACIFICA_2018 match
2019-03-09 18:17:20 -08:00
arne182 290aa2ac41 update @Kumar fingerprint for better recognition (#554) 2019-03-08 17:26:08 -08:00
Rick Lan 9c7cf0f505 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-03-06 14:56:51 +10:00
Rick Lan b386f50203 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-03-04 09:57:44 +10:00
jfrux b71f83aa8f Updates splash image with newer UI for README (#543) 2019-02-28 20:13:07 +01:00
Rick Lan 2754e73d61 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-02-27 13:58:59 +10:00
Rick Lan 8f9844eb82 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-02-27 12:57:17 +10:00
Nigel Armstrong a4ddc816e8 .gitignore visiond (#539) 2019-02-25 10:43:56 -08:00
Drew Hintz 444ece8c8f remove Pacifica 2019 from supported car list (#538)
Although there's a fingerprint and LKAS constant for the 2019 Pacifica, it doesn't work well enough that I'd consider it supported.

P.S. I have an idea for how to support all Chrysler with one code base, even those I've never looked at. Forward can0 to the stock LKAS (can2) so that the stock LKAS is active. Then read the stock LKAS messages on can2 to both get the vehicle's LKAS constant, any status messages, and perhaps a more reliable counter. I'll try to code it up this weekend.
2019-02-22 12:48:33 -08:00
Nigel Armstrong 69876dce00 Chrysler updates (#537)
* Chrysler updates

* Update openDBC
2019-02-21 23:23:40 -08:00
Rick Lan 3058b81601 Merge branch 'devel-lexus-ish-ave30r' of https://github.com/eFiniLan/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/car/toyota/carstate.py
2019-02-22 16:13:27 +10:00
Rick Lan 1ca8839e53 * refactor carstate 2019-02-22 16:12:38 +10:00
Rick Lan cc7f15fe88 * refactor carstate 2019-02-22 16:08:33 +10:00
Rick Lan b4bef4c034 update safetyParam to 66 2019-02-22 12:40:36 +10:00
Nigel Armstrong 9a47e634b9 Update Panda 2019-02-21 13:44:39 -08:00
Rick Lan 7e555671fe add stop_and_go and update retParam value 2019-02-21 23:35:32 +10:00
Rick Lan 5f268f3d9e Remove invalid signals/checks 2019-02-21 22:14:08 +10:00
Rick Lan 4ab5a70cdb remove duplicated definition 2019-02-21 20:15:45 +10:00
Rick Lan 1e2dc36a9f Update dbc 2019-02-21 19:57:54 +10:00
Rick Lan 2e7ee276f1 Merge branch 'devel' of https://github.com/eFiniLan/openpilot into devel-lexus-ish-ave30r 2019-02-21 16:46:29 +10:00
Rick Lan ac4d303a54 fix indentation 2019-02-21 16:38:48 +10:00
Rick Lan 09c58ea91d Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/car/toyota/interface.py
2019-02-21 16:36:17 +10:00
Rick Lan 4edf2c5c01 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-02-21 16:14:15 +10:00
Vehicle Researcher a36bad8391 openpilot v0.5.9 release 2019-02-20 01:39:02 +00:00
Vehicle Researcher 993e63c000 Merge pyextra subtree 2019-02-20 01:32:52 +00:00
Vehicle Researcher 43867dfe1a Merge opendbc subtree 2019-02-20 01:32:51 +00:00
Vehicle Researcher 26de1b3fa8 Merge panda subtree 2019-02-20 01:32:50 +00:00
Rick Lan cbd8cf8686 apply quillford's value again 2019-02-17 12:36:49 +10:00
Rick Lan caae16218e Revert "remove unnecessary changes in carstate.py"
This reverts commit 28836f85e5.
2019-02-17 12:36:11 +10:00
Rick Lan 17fbe1a4dd getting error from last change, revert a couple back. 2019-02-17 10:46:07 +10:00
Rick Lan 0f47ccc1ba apply quillford's KpV and KiV value. 2019-02-17 10:30:38 +10:00
Rick Lan 28836f85e5 remove unnecessary changes in carstate.py 2019-02-17 10:28:20 +10:00
Rick Lan 4368401e33 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-02-15 15:00:34 +10:00
Rick Lan 9e6470a325 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-02-15 14:59:28 +10:00
eFini 08fd80dc15 Allow uploader.py to compress rlog without upload permission (#471)
* Always Compress - Make sure uploader to bzip2 rlog once it's completed without any upload permission.
2019-02-13 20:39:24 -08:00
eFini 030577f4d7 Add "Accept-Encoding: gzip" header to mapd.py to reduce data consumption (#525) 2019-02-13 18:19:17 +01:00
Rick Lan e867ae40ba Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-02-07 12:11:55 +10:00
Rick Lan 4b865a1955 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-02-07 12:10:23 +10:00
Riccardo d03e94c4d5 Readme: FCA giraffe added 2019-02-06 16:40:08 -08:00
Rick Lan 8fe520a678 * add matched canbus message descriptions from 2017_toyota_master.dbc 2019-02-05 15:52:17 +10:00
kegman 97b5997b8b Eliminate brake oscillations and grinding / crunching / ripping sound when using Pedal (Honda Pilot Only) (#475)
* Eliminate brake oscillations when using Pedal

* Simplified code

* syntax error fix

* Grinding code as applied to Honda Pilot only 

Each model may need its own setting due to USER_BRAKE noise disengagements

* correction: self.CP.carFingerprint instead of CP.carFingerprint

* Add Ridgeline to Pedal Grinding fix

Confirmed to work also on Ridgeline
2019-02-04 20:30:19 -08:00
Rick Lan c3390a0cb5 update dbc file add a couple more definitions 2019-02-01 16:44:59 +10:00
Rick Lan e4a07f1b89 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-01-30 16:20:19 +10:00
Rick Lan 5c5ffb0129 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-01-30 16:18:35 +10:00
rbiasini 1b8ae3ed2e removal of snpe libs (#517)
Removal of unnecessary snpe shared libs
2019-01-28 21:10:39 -08:00
Roma Sokolkov 57d1157faf Add missing mapd and orbd dirs into README.md (#515) 2019-01-26 15:08:10 -08:00
Drew Hintz 26a61ecc61 fix typos, Jeep tuning (#511) 2019-01-25 22:41:08 -08:00
Rick Lan 4c2feaa1ab Update dbc file to support mini car and left/right line indicator on display 2019-01-25 12:28:04 +10:00
Rick Lan 3b3b366651 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2019-01-25 12:07:38 +10:00
Rick Lan 2eb7068a2d Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2019-01-25 11:51:16 +10:00
Vehicle Researcher f2cd3a85a5 openpilot v0.5.8 release 2019-01-23 15:34:52 -08:00
Vehicle Researcher 2da41efc26 Merge opendbc subtree 2019-01-23 15:28:22 -08:00
Vehicle Researcher 67c96e196e Merge panda subtree 2019-01-23 15:28:16 -08:00
Chris Souers 2b9771e594 Increment hatchback year (#508)
Confirmed working by user. Same steer dropout as before.
2019-01-21 18:01:16 -08:00
Riccardo 80fea67a58 Updated links from Slack to Discord 2019-01-14 14:32:43 -08:00
Chris Souers f6c2c9f283 Merge new 2019 Civic and existing 2017-18 Civic Hatch (#446)
* fingerprint and new car

* you know the drill

* fix

* mod civic hatch to work for now

* try to merge hatch and other bosch

* fix

* fixed spaces

* comma (heh)

* make mass civic

* Add to readme. Need to confirm speed

* steering dropout at ~3.3 kph

* Remove additional fingerprint

* combined comment. fixed formatting to match
2019-01-11 17:13:57 -08:00
Kylan 5d15d83faf Adding GM Steering Rate (#495)
* adding steering rate

* adding steering rate
2019-01-08 19:40:09 -08:00
Ted Slesinski cb31eb3408 Fixed TOC anchor links (#492) 2019-01-02 20:33:37 -08:00
ErichMoraga 38130c20ac Added EX-L subsection for the existing 2019 Pilot (#489)
*  Added EX-L subsection for the existing 2019 Pilot

Verified working with @Hitmantw25 12/20... and again 12/27 (VG w/ "Josh").

* Update selfdrive/car/honda/values.py

@energee wants to revert a change he made in a previous PR.

Co-Authored-By: ErichMoraga <33645296+ErichMoraga@users.noreply.github.com>

* Removed an extra space @energee included.
2018-12-30 18:23:10 -08:00
arne182 35a23f6f46 Update 0x365 for Rav4H from @squall and my observations (#490)
on stock 00000080fc0008 is the inital value then it changes to a static 00000080fd0008
2018-12-29 11:12:28 -08:00
Andrew Frahn 55e6a6f58b Clean Up hyundai (#481)
* Update fingerprints.py

Taiwanese Prius Prime fingerprint was identical to the regular prime (107 msgs.), but should really have 110.  I have the correct one in there now.

* openpilot 0.4.3.1 (#220)

* Honda Pilot 2017 Port (#161)

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update interface.py

* Update interface.py

* Update README.md

* Update README.md

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update carstate.py

* Update hondacan.py

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update carstate.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update carstate.py

* Update carstate.py

* Update Pilot Fingerprint

* Update fingerprints.py

* Give pilot its own definition and not use ILX

* add pilot argument

* Add Pilot interface

* Add pilot argument

* Update interface.py

* Parse Different gear on pilot

* Add steer max

* Fixed duplication of steer max value

* Adjust PID's for steering

* Update carcontroller.py

* Change Steer Ratio and wheelbase

* Update Steer fault values

Steer fault value of 3, does not seem to effect anything

* Update Kp,Ki Ratio

* Update interface.py

* Update readme for Pilot

* add pilot

* Update fingerprints.py

* Update carstate.py

* add signals

* add signal

* fix restricting video upload to wifi

* Dibs on SAFETY_GM numerical value

To match Panda repo.

* Safety Reference for Honda Bosch

* Update fingerprints.py (#210)

Consolidated my fingerprint and removed duplicates and ordered the fingerprint for the RAV4H. Double Checked.

* Interpolate ki/kp for steering PID loop (#200)

* Interpolate ki/kp for steering PID loop

Very much needed for the Volt port: car ping-pongs with low kp
on high speeeds, and the loop is unstable with high kp on
low speeds.

Also, removes "number or array?" logic from PIController,
now that all the callers use interpolation ofr ki/kp.

* Pass speed to steering PID loop for ki/kp interpolation

* Remove unused numbers import

* Slight changes to UI and Fingerprint for Odyssey Elite (#196)

* Adding back drive time to UI

* Add fingerprint for Odyssey Elite

* Removed extended fingerprint for Elite

* Revert "Adding back drive time to UI"

This reverts commit b9b02f7ff2511f28922f0bea47cd8c70bb9f4010.

* Squashed 'panda/' changes from 98f29a4..67d5208

67d5208 fix signedness issue in toyota safety
fe15d3f bump pandacan
11c2b08 add fault invalid
2c26e45 add sleep
27c7637 forgot the counter
3a6d7db don't hang
bfa7d2e canloader works
b259e2a can flasher is close to working
83f2edf isotp can support in softloader
7ae7c79 typo
e85cc47 forgot the selfs
190b4f6 start work on canflasher
5c655c9 add recover support
ae3457f usbflash is reliable
f7a0ab0 pedal usbflash works
585d0f9 add way to call isotp
be82899 despite it being bad code, move isotp
000715b start work on pedal canloader
626e312 pedal has a bootstub now
3662d1e redundant check
81e6b0d fix bug
083cd12 should have bounty to refactor that ish
b65d30c bad asserts
b2e6c3f isotp untested support for subaddr
30fd66a Merge pull request #93 from vntarasov/volt
06f5109 Merge pull request #94 from gregjhogan/can-printer-hex
c7d098c Merge pull request #95 from gregjhogan/setup-script
22fe250 Merge pull request #99 from gregjhogan/bit-transition-example
ba16ba3 Merge pull request #100 from gregjhogan/j2534-troubleshooting-instructions
ad08ea4 Merge pull request #90 from gregjhogan/can-forwarding
f3b6f5d added j2534 troubleshooting instructions
858d150 added script to find bits that transition from 0 to 1
c6acac8 added checking pedal interceptor message length
f7226ff added brake safety checks
d0c2634 added gas safety checks
d378e4a removed bosch safety forwarding restriction on 29 bit addresses
5c7ef9e added bosch safety hooks and forwarding
90c64b6 add note
23de8d4 Merge pull request #97 from commaai/pedal_improvements
0261641 added missing python packages
b92b235 fix bytearray encode issue
2434f1c Tweak Volt's brake pedal stickiness
e2f73d2 enable has a whole byte to itself
d5a9e1e correct checksum
f8ed9fa better names
986a14c don't alias pointers
9b8472e add watchdog support
8f0add9 handle faults
1d917f8 split gas set into 2 values, and have a fault state
1b77026 j2534 isn't alpha anymore
fbcc872 Merge pull request #92 from commaai/pedal
8a6f44b pedal is sending messages
08f464c python 3 bro is bad bro
9390961 kline checksum algo was broken...
3b7c33b add kline debug support
aa622bc init values
631ea9f better refactor
eb1fd75 add PEDAL adc sets
ccaa310 don't build with usb
8d4d763 debug console works
bd09883 comma pedal is building
75a29d5 Merge pull request #84 from gregjhogan/j2534-hds
eece37d only the panda has gmlan
9f43abe Merge pull request #89 from vntarasov/volt
5364d43 Merge pull request #88 from vntarasov/smaller-firmware
377a1ec bump version for descriptor fix
4fabdf0 Merge pull request #87 from gregjhogan/usb-multi-packet-control
8580773 fix sending WinUSB Extended Properties Feature Descriptor
6908feb Chevy Volt safety
786a004 Enable optimization to reduce firmware size
d70f43b hack to fix thinkpad
95ab1ae fixed flow control message padding
bbd04d1 updated installer
62216d0 single standalone DLL for J2534 driver
5c9138d fixed 11 bit address issue
f3b0ad2 fix LOOPBACK getting set when DATA_RATE is set
b750d36 updated README
a9a097f lowered CPU utilization
7c26a70 TIS needs unsupported protocols to return an error
42692b4 TIS doesn't like ChannelID being zero
cf126bb SET_CONFIG return error for reserved parameters
2e99dbf fix HDS issues
8203cc8 add is_grey
e946a54 add insecure_okay flag
4363b3e check webpage
4f59ded add secure mode note
6b11fb5 add autosecuring to tests
b27d185 Merge pull request #86 from commaai/better_pairing
4b53b42 elm wifi isn't an automated test
99f85cb Merge pull request #85 from gregjhogan/usb-wcid
0d38060 auto-install WinUSB device driver
c6653ca from python import
38cc0ee add wifi_secure_mode, boots in insecure mode

git-subtree-dir: panda
git-subtree-split: 67d52089a1300b86800d897f2b271e0a24cf6dd6

* Squashed 'opendbc/' changes from 81d9871..aa067f7

aa067f7 Chevy Volt tweaks (#83)
a60c6c4 Toyota: change signal name in EPS_STATUS msg
ce70b1a extra setme field toyota LKAS_HUD
df2a552 toyota missing ACC_CONTROL checksum
48bb293 Revert "Toyota Prius: added a comma specific message to control the speed sent to the EPS"
5f42439 Toyota Prius: added a comma specific message to control the speed sent to the EPS
6f5e8b6 Pedal Interceptor: fault state VAL moved to _comma
efd5f5c add setme to honda ACC_HUD
97fc335 add interceptor to civic
6f40f16 update generator script to allow for multiple imports
9ca956b add setme to toyota STEERING_IPAS
e5afa57 run generator for ipas scaling
8bd1182 Toyota IPAS: proper steer angle unit
f57511e acceleration pedal for gasPressed
c8d1dbc high beams also. likely dashboard message.
9f1c78b high beams for genericToggle
f037d42 turn signal lights (and thus hazard lights)
b35bb08 turn signals
78986cf Revert "turn signals"
ba946c9 turn signals
2af3ecc Speed, braking, and distance signals
f40ab87 Set packet lengths, adding steering rate, adjusted speed
cd59bfa units for speed_right
c2fcce2 speed of right vs left side of car
4ef5fae value table for gear status
97c48e2 tighten up speed bits. brake pressue max comment.
a0cbfd1 add gear status PRNDL
0c82865 initial signals for chrysler pacifica 2017 hybrid
5ed0540 add set me to toyota LKAS_HUD
aecac5d add set me fields to toyota ACC_HUD
5417013 update toyota ACC_CONTROL fields
e91e967 Comma Pedal: made GAS_COMMAND 6 bytes
d04434a Comma Pedal: added state byte and enable bit
c30b2cd Comma Pedal: sending 2 tracks on 0x200
8f72467 Volt doors and belts status (#70)
60f8b6c add set me to lkas hud honda
3c9e335 fix honda pcm gas message size
7ca471d Add 2018 Toyota CHR dbc (#78)
637fe00 set scaling to 1 for brake and gas which have no real unit
62a88d4 Volt: switch to parsing ACC buttons from powertrain CAN (#74)
3fdd47b Volt's gas pedal only and combined gas/acc (#76)
45ec9c9 Add 2017 Honda Ridgeline (#77)
cbd186a Add 2018 Camry Hybrid DBC's (#73)
974eeaf Toyota: re-generated the files after cfbc9ae363f98ef
19ea195 Toyota: more vals for LKA_STATE
cfbc9ae fixed inconsistent factor for speed in Honda dbc files
e7db803 convert all line endings to unix style

git-subtree-dir: opendbc
git-subtree-split: aa067f7079aa12617f7a37d85233e51af44e1bb2

* openpilot v0.4.3 release

* Squashed 'panda/' changes from 67d5208..3125232

3125232 bump version
703c0b4 Gas Interceptor: another fix to gas pressed logic
196d383 Interceptor: fixed gas pressed logic

git-subtree-dir: panda
git-subtree-split: 31252324d98e701c33cb6aeda20af6b549175764

* Squashed 'opendbc/' changes from aa067f7..91e882d

91e882d Updating bosch dbcs to use new format and bringing in new honda changes (#82)
9b32e2e Fix Checksum errors for CH-R (#86)

git-subtree-dir: opendbc
git-subtree-split: 91e882d4a04c129e12d39bcff0bbe56b75166e0f

* openpilot v0.4.3 release

* openpilot v0.4.3.1 release

* fix bug in canpacker for Toyotas with DSU connected (#221)

* update year on civic

* Revert "openpilot 0.4.3.1 (#220)"

This reverts commit 32ebfde2ddf907878aa2faca2624ec23e495b5f7.

* Revert the changes to GM in 0.5.4 (#380) (#386)

* Revert 0.5.4 changes for GM for 18ers

* Redo the refactor of stock control msgs

* Fixed missing CONTROL_MSGS -> STOCK_CONTROL_MSGS

* Remove spacing

* Need candidate array idx

* Cleanup

Uses generic dbc
All car names in alphabetical order
All fingerprints in alphabetical order
Acknowledgement to users who have made each vehicle possible

* no unecessary comments

* Match dbc to opendbc
2018-12-26 21:43:04 -08:00
Braden 185e5b3865 Read from usb/present instead of usb/online (#484) 2018-12-25 09:51:07 -08:00
ErichMoraga 44d4b643f3 Replaced 60 msg. C-HR print w/ 73 msg. C-HR print (#467)
Confirmed working, and necessary with @wackojacko Toyota CHR's Kiwi (New Zealand) ICE C-HR.
2018-12-21 01:43:18 -06:00
arne182 431a6de992 add self.CP = CP as with other carstate files (#459) 2018-12-21 01:40:26 -06:00
Ted Slesinski 921b8d3cdb Adds 2019 Ridgeline fingerprint (#473)
* Adds 2019 Ridgeline fingerprint

* Add readme
2018-12-21 01:21:05 -06:00
rbiasini 734cb27345 Faster NEOS download and auto removal of NEOS image after installation (#478) 2018-12-21 01:17:27 -06:00
Rick Lan 0bf4f95a41 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-12-17 17:11:43 +10:00
Rick Lan d473152c82 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-12-17 17:10:45 +10:00
rbiasini cffdffb528 hotfix: wait longer in CDP mode before switching to fast charge, so EON can boot (#469) 2018-12-16 19:54:29 -07:00
Rick Lan a641e8c9d3 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-12-14 10:42:46 +10:00
Rick Lan 46543952e5 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-12-14 10:25:05 +10:00
Riccardo 7d5daf4747 0.5.7 hotfixes 2018-12-13 20:49:44 +01:00
Rick Lan b9a925481e Move ave30r related changes to only this branch 2018-12-12 11:52:31 +10:00
Rick Lan 39f150ad96 Merge branch 'devel' of https://github.com/EternityLan/openpilot into devel-lexus-ish-ave30r 2018-12-12 11:51:16 +10:00
Rick Lan 7f72a7d28e revert changes. 2018-12-12 11:50:06 +10:00
Rick Lan 8b7e17d86f Merge branch 'devel' of https://github.com/EternityLan/openpilot into devel 2018-12-12 11:47:37 +10:00
Rick Lan 4935fa7353 revert devel back to stock devel 2018-12-12 11:47:31 +10:00
Rick Lan 0cf5bfaaf4 revert devel back to stock devel 2018-12-12 11:45:51 +10:00
Rick Lan f45cb16d4e Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-12-11 18:39:00 +10:00
Rick Lan 9cfd6bfeea Merge branch 'devel' of https://github.com/EternityLan/openpilot into devel 2018-12-11 18:36:40 +10:00
Vehicle Researcher f552ca210e openpilot v0.5.7 release 2018-12-10 14:13:12 -08:00
Vehicle Researcher 9d2fef093e Merge pyextra subtree 2018-12-10 14:06:10 -08:00
Vehicle Researcher 2729c0d740 Merge opendbc subtree 2018-12-10 14:06:07 -08:00
chassdesk 51d9c1a7c6 Add Lexus RX450HL as sub to RX450H (#458)
Add Lexus RX450HL as sub to RX450H
2018-12-08 13:13:09 -08:00
Chris McCammon 9b86a6edf4 Fixed Capitalization + Made CT6 Comment Cleaner (#456)
* Update README.md

* Updated CT6 comment
2018-12-07 17:32:41 -08:00
Vasily Tarasov 15dc299714 GM: Cadillac ATS Coupe 2018 support (#445)
* GM: Cadillac ATS Coupe 2018 support

* Missed adding Cadillac ATS
2018-12-06 21:22:21 -08:00
Rick Lan 1ace12eb12 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-12-05 12:54:42 +10:00
Kylan 9ea18b8e2b Adding support for 2018 GMC Acadia Denali (#453)
* added acadia

* adding acadia

* adding acadia

* Update radar_interface.py

* adding acadia

* refactored

* fixed tuning

* Adding acadia

* Update interface.py

* fixed whitespace

* fixed whitespace
2018-12-04 08:35:36 -08:00
rbiasini 3251b60a22 Honda Nidec: avoid giraffe setting alert when car is turned off (#449) 2018-11-29 20:36:34 -08:00
Rick Lan c49d85082f Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-23 11:03:32 +10:00
rbiasini 3fad3bfc5c Added Astra support to README and RELEASE notes (#443) 2018-11-21 00:01:04 -08:00
Rick Lan 0f4acd346c Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-21 15:38:07 +10:00
Alex Hill 0f82021798 Add initial support for Holden/Opel Astra BK (#431) 2018-11-20 20:12:50 -08:00
Rick Lan 703bef2735 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-20 16:02:26 +10:00
Vasily Tarasov 6e83cf4245 Keep steering on radar fault (#442) 2018-11-19 20:25:33 -08:00
Rick Lan b7b24f5a8f revert if else statement so it doesn't cause error. 2018-11-19 21:10:50 +10:00
Rick Lan 6fd1eaf492 remove else statements 2018-11-19 12:27:34 +10:00
Rick Lan f6bf0e4f4e Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-19 12:19:56 +10:00
Rick Lan 1b3dd93fcc ignore standstill in lexus ish 2018-11-19 12:19:27 +10:00
dekerr 083ce17c02 Move calibration values (#441)
* initial commit

* moved constants
2018-11-18 17:18:29 -08:00
Vasily Tarasov 5591e42fcf GM: remove refactor leftovers (#440) 2018-11-18 16:13:44 -08:00
Rick Lan a79fc339ae fix dbc to adapt 0.5.6 2018-11-18 15:55:06 +10:00
Rick Lan 959abaca9c Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-18 14:13:32 +10:00
Abdul Hagi a06eaf7b95 Added 2016 Honda pilot (#438)
I am able to validate that openpilot works on a 2016 Honda Pilot.
2018-11-17 09:34:48 -08:00
Vehicle Researcher 9302045232 openpilot v0.5.6 release 2018-11-17 02:08:34 -08:00
Vehicle Researcher e2df5f91ad Merge pyextra subtree 2018-11-17 01:58:38 -08:00
Vehicle Researcher d44213f6d4 Merge opendbc subtree 2018-11-17 01:58:36 -08:00
Vehicle Researcher 73df3624f9 Merge panda subtree 2018-11-17 01:58:34 -08:00
Rick Lan 21c6e66e4f Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-16 09:06:10 +10:00
rbiasini 4680447dd0 Revert "Honda Pilot tuning / lane centering fixes (#408)" (#433)
This reverts commit c6be3e2ed5.
2018-11-13 14:36:29 -08:00
Rick Lan 5e617d1104 use downloaded file 2018-11-12 16:06:12 +10:00
Rick Lan 729fc8464c more changes 2018-11-12 16:05:26 +10:00
Rick Lan 0e79da03b5 remove changes 2018-11-12 16:04:42 +10:00
Rick Lan 70a71b741b fix 2018-11-12 16:03:55 +10:00
Rick Lan 0990c0ee5e revert changes 2018-11-12 15:55:01 +10:00
Rick Lan 9d33ceee33 removed all customd stuff 2018-11-12 15:51:55 +10:00
Rick Lan b47b371d7e some minor code update. 2018-11-12 15:44:33 +10:00
Rick Lan 977579e4aa Use os.system instead of subprocess. 2018-11-12 13:10:16 +10:00
Rick Lan 643224fd7d * init -- customd 2018-11-12 11:51:53 +10:00
arne182 bb2af14dab 0x470 for RAV4H (#428)
@squall and me have checked the dsu static values for our RAV4H and found that this is similar to the highlander message.
2018-11-09 13:36:34 -08:00
Rick Lan e908f4b8dc Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-09 15:31:44 +10:00
rbiasini 07c33192fe more stable calibration (#427)
* more stable calibration

* no commented print
2018-11-08 19:48:21 -08:00
Rick Lan 49eaa39aa2 Merge branch 'devel' of https://github.com/EternityLan/openpilot into devel 2018-11-09 13:35:53 +10:00
Rick Lan afa8692dbe more changes for removing lexus specific safety. 2018-11-09 13:35:39 +10:00
Rick Lan 6d1a974f74 more changes for removing lexus specific safety. 2018-11-09 13:34:36 +10:00
Rick Lan 096aec71e5 Cruise state on lexus and toyota are both in 0:1D2 @ 0x20, so we can mergee lexus specific safety check with toyota. 2018-11-09 13:31:33 +10:00
Rick Lan 93a5dc40c7 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-09 09:59:36 +10:00
ErichMoraga b5f662e26c Expanded the previously added Chinese RAV4 (#425)
This came after testing a different trim level.  This fingerprint is confirmed working on both.
2018-11-08 09:56:05 -08:00
Rick Lan 6c73e0d877 Merge branch 'devel' of https://github.com/commaai/openpilot into devel 2018-11-07 16:56:35 +10:00
dekerr 2b8e62a0d6 Faster calibration filtering (#421)
* separable filter

* add missing args

* formatting

* fix casing
2018-11-06 13:51:37 -08:00
ErichMoraga 736cf2fe32 Added fingerprint for Chinese RAV4 (#422)
Confirmed working on 2017-2018 Chinese RAV4 by @Fiftycentsjj
2018-11-05 18:43:50 -08:00
kegman c6be3e2ed5 Honda Pilot tuning / lane centering fixes (#408)
Tuned kP and kI and Tire Stiffness Factor settings.
Fixes lane centering issues in the following situations:
1.  Hugging of left lane line during fast left curving roads
2.  Hugging of right lane line during fast right curving roads
3.  Left bias in fast lane on crowned roads (sloping down to the left)
4.  Right bias in slow lane on crowned roads (sloping down to the right)
Works better when lane_width = 2.85 (vs 3.7 default) in pathplanner.py
2018-10-31 11:09:48 -07:00
Rick Lan 327c6b8c53 added missing line break 2018-10-31 12:44:21 +10:00
Rick Lan 87140dc8b5 Merge branch 'devel' of https://github.com/commaai/openpilot into devel
# Conflicts:
#	selfdrive/boardd/boardd.cc
2018-10-31 12:41:16 +10:00
dekerr 153d7a4816 Improve VM dynamic sol accuracy (#391)
* use solve and eye func

* remove uneeded import from vehicle model
2018-10-30 22:30:09 +01:00
Jafar Al-Gharaibeh e0d95a63f3 boardd: keep defined safety models in sync with panda repo (#412)
This is a noop for most users, but for those of us working on new
car ports where we have our own additional defines, having
those defines out of sync creates merge conflicts in one place
(good so we can fix it) but not the other ( not good becasue
they will go unnoticed). I learned this the hardway!.

Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
2018-10-30 22:13:18 +01:00
Rick Lan 43d81590bb min enable speed set to -1. 2018-10-29 08:54:27 +10:00
Willem Melching ea684537a9 Improve Toyota radar filtering (#409) 2018-10-26 17:26:00 +02:00
Rick Lan 61576239cf Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-26 10:57:45 +10:00
Rick Lan ad7f1bb446 * revert unnecessary changes 2018-10-26 10:24:57 +10:00
Rick Lan 72ab35d8d6 * added missing values in checks[] 2018-10-26 10:23:39 +10:00
Rick Lan 46655232b6 * clean up changes, rename PCM_CRUISE_LEXUS_ISH in dbc to PCM_CRUISE_2 to reduce changes required in carstate.py 2018-10-26 10:19:49 +10:00
Vasily Tarasov 318e22e39f GM: disengage on radar fault (#396)
* GM: copy cadillac's radar header DBC

* Remove unused interface imports

* Rename num targets message to radar header

* Catch various radar faults
2018-10-23 18:59:34 -07:00
James-T1 8b7f4dc154 Update Genesis fingerprint for longer version from Saeed (#406) 2018-10-23 18:57:51 -07:00
Rick Lan bbc001e12a making sure every SAFETY_LEXUS_ISH defined as 9 2018-10-24 10:12:04 +10:00
Rick Lan 96dbf1657c Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-24 10:05:58 +10:00
Rick Lan 615f90629c update lexus ish defined value to match the value in safety.h in panda/ 2018-10-24 10:03:52 +10:00
rbiasini 434a29a4ee remove badly named file (#404) 2018-10-23 12:05:11 -07:00
Rick Lan 660aaae90c removed extra defined 2018-10-23 14:36:27 +10:00
Rick Lan 97fb20e9fd Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-23 13:45:42 +10:00
Willem Melching 1f0144d121 Fix Visiond (#402) 2018-10-22 21:59:18 +02:00
Rick Lan 6e4ac6e5be * merged with 0.5.5 2018-10-22 10:42:22 +10:00
Vehicle Researcher caad98839f openpilot v0.5.5 release 2018-10-21 15:00:31 -07:00
Vehicle Researcher 25eb268c10 Merge opendbc subtree 2018-10-21 14:52:59 -07:00
Vehicle Researcher 9843c250ce Merge panda subtree 2018-10-21 14:52:58 -07:00
Ted Slesinski ecd6e1597f Added new fingerprint for EX-L (#401) 2018-10-20 11:02:00 -07:00
Rick Lan 8068e418c0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-19 12:02:17 +10:00
Rick Lan 2ea95f18e4 * update auto high beam dbc address. 2018-10-19 12:02:00 +10:00
Andrew Frahn ce13309d74 Revert to using CLU15 message for Gear Selection for Compatability Reasons (#362)
* hyundai WIP

* steer_driver_factor is 1

* removed unnecessary file

* removed unnecessary code

* Update carcontroller.py

bug fix

* safety tuning and fixed interface stiffness

* better lateral tuning, some fixes

* Fix set speed

* added camera state reading, autoresume from stop, cancel on accel, hud alerts

* WIP

* Updated for Kia Sorento *WIP*

* Cleanup

* clean2

* Bug Fixes

* pre-merge

* Add all the cars!

* Panda to auto-detect Camera Bus

* Move Checksum Check

* Final Sorento Tuning

* Make CAN3 for Cam default

* Update README.md

* update panda, minor aesthetic updates

* few other minor changes

* added steer not allowed alert

* bup panda version to force panda update

* fixed camera alerts

* Revert to using CLU15 for Gear Selection

* Missing Defines

Didn’t realise this was removed as well!

* Change Gear Selection Definitions

Add logic to use transmission message rather than cluster message for all gear selections UNLESS the car in question does not have the known good transmission messages

* Revert Camera CAN Bus

* self.candidate

* fixed fingerpint, tested on Sorento

* Update for Elantra on Hyundai-Dev Branch

Latest Elantra values that correlate to progress Community branch.
2018-10-14 07:30:18 -07:00
Vasily Tarasov 64f8cbd387 GM: LKA dashboard icon support (#389)
* GM: LKA dashboard icon support

* Decrease camera keepalive interval

* Use tuple for LKA icon status
2018-10-12 17:37:13 -07:00
Rick Lan e2767e94a7 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-10 16:16:40 +10:00
dekerr a2b46f3e8e Save one inverse call in building transformation matrix (#384) 2018-10-08 21:02:20 +02:00
Rick Lan e70922b1ce Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-10-04 14:26:51 +10:00
Jamezz 92146346bf Revert the changes to GM in 0.5.4 (#380)
* Revert 0.5.4 changes for GM for 18ers

* Redo the refactor of stock control msgs

* Fixed missing CONTROL_MSGS -> STOCK_CONTROL_MSGS

* Remove spacing

* Need candidate array idx
2018-10-01 19:13:34 +02:00
Rick Lan 41cb13ada0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-28 12:24:12 +10:00
George Hotz fb2263a0b1 Merge pull request #377 from commaai/nowiggle
visiond: replace wiggly model with non wiggly model
2018-09-27 13:25:00 -08:00
George Hotz a32e5119fd visiond: replace wiggly model with non wiggly model 2018-09-27 09:52:07 -07:00
Rick Lan 7b4cd6dd2d Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-26 10:15:33 +10:00
Vehicle Researcher 71f1af62c2 openpilot v0.5.4 release 2018-09-25 00:13:41 -07:00
Vehicle Researcher 07d65aa3e6 Merge opendbc subtree 2018-09-25 00:04:00 -07:00
Vehicle Researcher 12e51751ee Merge panda subtree 2018-09-25 00:03:58 -07:00
Vasily Tarasov af474d4935 Increase Volt's steering limit (#351)
* Increase Volt's steering limit

* Merge panda subtree
2018-09-22 04:41:44 +02:00
Vasily Tarasov 0a72e578f0 GM refactor (#374) 2018-09-22 04:40:52 +02:00
wocsor 8e42b86660 Add XSE trim to fingerprints (#372) 2018-09-21 01:06:15 +02:00
Rick Lan 854f9cf59e Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-20 12:08:22 +10:00
Ted Slesinski 45a18307e5 Docker environment breaking (#369)
* Fixes matplotlib dependency

* Use version 2.1.2
2018-09-20 02:59:18 +02:00
Rick Lan ddef346fc3 * fixed opendbc content order, otherwise cabana can't load it. 2018-09-20 10:27:43 +10:00
Rick Lan 976847dc69 * revert unnecessary changes. 2018-09-19 14:10:37 +10:00
EternityLan ef0af88f23 Merge pull request #1 from EternityLan/devel_lexus-ish-ave30r_v2
Devel lexus ish ave30r v2
2018-09-19 14:05:16 +10:00
Rick Lan 4a1dd020c7 Merge branch 'devel-lexus-ish-ave30r' of https://github.com/EternityLan/openpilot into devel_lexus-ish-ave30r_v2 2018-09-19 14:02:25 +10:00
Rick Lan 6e476b69c7 * fixed .tx_lin assignment 2018-09-19 13:59:00 +10:00
Rick Lan 4cbbce39d7 * renamed AVE30 to ISH 2018-09-19 10:13:07 +10:00
Rick Lan fe606a5ba4 Merge branch 'devel' of https://github.com/commaai/openpilot into devel_lexus-ish-ave30r_v2 2018-09-19 09:08:10 +10:00
Rick Lan c87526ea54 * v2 init 2018-09-19 09:05:48 +10:00
Rick Lan bfdf0508c0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-19 09:02:35 +10:00
Ted Slesinski cf268ff510 Add support for accord hybrid (#361) 2018-09-18 06:39:58 +02:00
wocsor c1283b0976 update CHR fingerprint (#364)
CHR 2016 fingerprint has more messages
2018-09-17 22:24:52 +02:00
Andrew Frahn 72c13f975f Kia Sorento and future Multi-Car Support (#346)
* hyundai WIP

* steer_driver_factor is 1

* removed unnecessary file

* removed unnecessary code

* Update carcontroller.py

bug fix

* safety tuning and fixed interface stiffness

* better lateral tuning, some fixes

* Fix set speed

* added camera state reading, autoresume from stop, cancel on accel, hud alerts

* WIP

* Updated for Kia Sorento *WIP*

* Cleanup

* clean2

* Bug Fixes

* pre-merge

* Add all the cars!

* Panda to auto-detect Camera Bus

* Move Checksum Check

* Final Sorento Tuning

* Make CAN3 for Cam default

* Update README.md

* update panda, minor aesthetic updates

* few other minor changes

* added steer not allowed alert

* bup panda version to force panda update

* fixed camera alerts
2018-09-10 00:30:36 +02:00
Rick Lan 23126143be Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/car/toyota/interface.py
2018-09-08 19:53:22 +10:00
rbiasini 7abb07b402 fixed sign in after Google change (#357) 2018-09-08 06:19:48 +02:00
zeeexsixare f94419ccb0 Tried native Stop and Go on Highlander ICE with no comma pedal: Works! (#353)
* Trying to make Highlander ICE stop and go

* Making acceleration slow for fuel efficiency

* Removing annoying commanded disengage beep

* Raised accel_max by 50% and commented on chime

* Testing if Highlander ICE can resume follow from 0

* Returned to 1.5 m/s2 for testing stop and go

* Prep for merging upstream

* Prep for upstream merge item #2

* Added Highlander ICE/Hybrid to Stop and Go

Also updated table of vehicles

* Rollback advertising stop and go for Highlanders

* Fix whitespace
2018-09-07 05:03:10 +02:00
Vasily Tarasov ff3df00e0f GM: update readme, ACC is a required package (#354)
ACC implies Driver Confidence II, but not the other
way around. Openpilot requires front, long range radar
that only comes with ACC package.
2018-09-07 05:01:53 +02:00
Vasily Tarasov d845a258de GM: go passive if detected ASCM or LKA camera (#350)
Since fingerprint is powertrain CAN only, camera still present
on object bus is not an issue.
2018-09-06 20:59:05 +02:00
daehahn 4888d07567 Correct typo for Highlander (#349) 2018-09-05 15:29:36 -07:00
Vasily Tarasov 5acc12852a Change dashboard command of GM to use packer (#347)
* Change dashboard command of GM to use packer

Also, separate "follow distance" from "engaged".

* Fix dashboard setSpeed scaling
2018-09-04 00:21:04 -07:00
Rick Lan 47fa5c78a1 * update safetyParam, 100 doesnt hold bumpy road 2018-09-04 17:16:37 +10:00
Vasily Tarasov b87dc53c39 Fix pre-enable engagement on GM (#348)
In 2017 Volts, PCM fault occurs for a few seconds if ACC gas
is commanded while user presses gas pedal. PID winds up,
and when PCM fault clears, car gets a "max gas" jolt.

In 2018 Volts, PCM fault doesn't time out, which means pre-enable
doesn't work at all, and car would slowly decelerate, while openpilot
thinks it's engaged.
2018-09-04 00:16:09 -07:00
Rick Lan 175a3b074f * changed safetyParam to 100/1.0 2018-09-04 13:24:14 +10:00
Rick Lan 4bf897953c * remove extra space. 2018-09-04 13:22:39 +10:00
Rick Lan 30be8b9d04 * fix conflict. 2018-09-04 12:50:50 +10:00
Rick Lan c70a2175c0 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/boardd/boardd.cc
#	selfdrive/car/toyota/interface.py
#	selfdrive/car/toyota/values.py
2018-09-04 12:40:02 +10:00
Vehicle Researcher 5942905701 openpilot v0.5.3 release 2018-09-03 16:43:12 -07:00
Vehicle Researcher b6ade014a5 Merge opendbc subtree 2018-09-03 16:41:18 -07:00
Vehicle Researcher 46bdbd36b5 Merge panda subtree 2018-09-03 16:41:16 -07:00
Rick Lan 164a84d049 * updated minEnableSpeed to 19mph as per @rbiasini recommendation. 2018-09-03 13:46:33 +10:00
tentious 3f4c902c6a Honda Odyssey 2018/2019 EX-L PID Tuning (#343)
* Honda Odyssey 2019 EX-L PID Tuning.

* Update interface.py - Increased Kp for Odyssey

Increases response from 0.4, but oscillation still occurs in very sharp curves.
2018-09-02 20:06:19 -07:00
Rick Lan d382623398 Merge branch 'devel-lexus-ish-ave30r' of https://github.com/EternityLan/openpilot into devel-lexus-ish-ave30r
# Conflicts:
#	selfdrive/car/toyota/interface.py
2018-09-03 12:00:45 +10:00
Rick Lan db6f46b862 * update minEnableSpeed 2018-09-03 12:00:15 +10:00
Rick Lan 9c2cae25d0 * update minEnableSpeed 2018-09-03 11:53:13 +10:00
Rick Lan 7d34a8fe71 Merge branch 'devel' of https://github.com/commaai/openpilot into devel-lexus-ish-ave30r 2018-09-03 11:48:54 +10:00
Ted Slesinski e968bb921d Some code refactoring to Honda (#335)
* Move vehicle state values (that get sent to radar) into values.py file, its a better place for it :)

* idx with offset should only be applied to 0x300

* Adds new honda pilot to vehicle state msg array
2018-08-31 19:57:11 -07:00
Rick Lan 4931c8ed3b * all to lower case 2018-08-31 10:40:55 +10:00
Rick Lan e488a6d88d * minor changes to static msgs. 2018-08-31 10:28:17 +10:00
Rick Lan f3af6c1fd5 * updated comments. 2018-08-31 00:04:46 +10:00
Rick Lan 397494478a * fix compile error. 2018-08-30 20:49:29 +10:00
Rick Lan 80f13dc8ef * delete unused def. 2018-08-30 20:46:33 +10:00
Rick Lan 7a1a14418e * removed unused var definition. 2018-08-30 20:45:06 +10:00
Rick Lan defe5dff68 * fix control mismatch issue. 2018-08-30 20:40:46 +10:00
Rick Lan c5d2d2ea5f * use standard ui command, looks no different before and after. 2018-08-30 20:26:09 +10:00
Rick Lan bc81560e3b * removed duplicated msg in signal 2018-08-30 20:14:57 +10:00
Rick Lan 99a25a480b * init acc_addr & acc_vl value 2018-08-30 20:06:28 +10:00
Rick Lan 8c05ca15b4 * init commit 2018-08-30 16:11:04 +10:00
Riccardo 5e37e14498 Added Pilot 2019 as supported car to README 2018-08-28 14:25:00 -07:00
rbiasini f815038069 fixing base UI crash after completing OP guide for the first time (#337) 2018-08-27 10:43:23 -07:00
Ted Slesinski fe296e91ba Adds 2019 Pilot (#334) 2018-08-26 22:35:11 -07:00
rbiasini 64ba1a7cab fix critical put and get param that caused sporadic controlsd hanging (#333)
* fix critical put and get param that caused sporadic controlsd hanging

* test fix
2018-08-24 19:45:33 -07:00
Jamezz d18aefe4bc Volt: Don't adjust speed on resume from stopped (#325)
* Don't adjust speed if resuming

* Detab
2018-08-23 18:39:11 -07:00
rbiasini 86a8902872 little endian mask fix (#330) 2018-08-22 11:36:55 -07:00
Vehicle Researcher fd891b97d6 openpilot v0.5.2 release 2018-08-19 20:36:37 -07:00
Vehicle Researcher c2a1b71ed4 Merge opendbc subtree 2018-08-19 20:34:33 -07:00
Vehicle Researcher 5e3daaaf11 Merge panda subtree 2018-08-19 20:34:21 -07:00
rbiasini 5e21353fca updated opendbc (#322) 2018-08-16 17:02:52 -07:00
Ted Slesinski c441124228 Adds 1.5L accord support (#321)
* Adds support for 1.5L Accord

* Merge opendbc subtree
2018-08-13 22:38:14 -07:00
arne182 ce6d787ca2 Spelling Correction (#316) 2018-08-03 00:17:00 -07:00
Vehicle Researcher 38cfc60441 openpilot v0.5.1 release 2018-08-02 02:58:52 +00:00
Vehicle Researcher 03f5ec3346 Merge opendbc subtree 2018-08-02 02:55:39 +00:00
Vehicle Researcher 84fd87c67c Merge panda subtree 2018-08-02 02:55:38 +00:00
rbiasini d17f80f86a Revert "Added 2014 pre-AP tesla (prior to Oct 28, 2014) (#303)" (#307)
This reverts commit 60426226d0.
2018-07-20 15:06:57 -07:00
Jean-Claude Thibault 60426226d0 Added 2014 pre-AP tesla (prior to Oct 28, 2014) (#303) 2018-07-20 15:02:01 -07:00
Mutley fad769fbaa Update README.md (#295)
Changed GM minimum speed for steer control
2018-07-15 22:21:52 -07:00
Joshua F. Rountree 758c885973 Adds Pedal Interceptor Support for Honda & Acura Vehicles (#274)
* Adds Joel's Changes to values, sorted as Rick wanted.

* Adds space at end of file.

* Adds Changes to Steering Ratio for Pilot testing.

* Adding this to steer ratio makes it even 3.33

Not sure if this should go into this PR though or not.
This makes the ratio match the other vehicles in the file.  Otherwise it's 3.454545...

* Changes the RAV4 back to not include pedal.

* Updated Comments for Pedal Support

* - Adds menuever test output to gitignore.
- Slight comment update to Ridgeline

* - Cleanup steer status comments
- Adds steering warning for interceptor cars in low speed lockout.

* Cleans up comments.

* Update README.md

* Corrects verbiage in README regarding Comma Pedal on Honda's

* Updates Odyssey and MDX to not add extra warnings for low-speed-lockout.

* Updates Comma Pedal references to use anchor links.

* Minor tweak to README

* Updates RDX to warn no steering below 12mph

* Reverts changes to README, carstate.py, and interface.py

* Removes extra libraries from a prior experiment.

* Replaces README with one from current devel.  Hope this fixes spacing issues.

* Adds Pedal back to Honda Cars and sorts fingerprint values

* Fixes spacing changes that were not intentional.

* Fixed carstate no newline at end of file.

* Fixes new line at end of file issue.

* Converted the Long's to Int's
2018-07-13 17:15:42 -07:00
George Hotz 734002eb63 Merge pull request #290 from commaai/pedal-resum-speed-fix
fixed resume press when comma pedal is used
2018-07-13 16:55:40 -07:00
Riccardo 949cbd214b fixed resume press when comma pedal is used 2018-07-13 15:52:59 -07:00
George Hotz 0d9447c76b Merge pull request #288 from jfrux/patch-1
Minor README.md update.
2018-07-13 12:24:24 -07:00
Joshua F. Rountree ce0205bcd4 Update README.md 2018-07-13 13:10:37 -04:00
Joshua F. Rountree 919a131c58 Integrated the requests by Andrew 2018-07-13 12:17:42 -04:00
George Hotz 34efbd6869 fix up table 2018-07-12 23:02:20 -07:00
Joshua F. Rountree 23444a7a70 Minor README.md update.
Loving the way this adds some realism and cleans things up a bit on the image.
Let's do this! xD <3

Thanks for the AMAZING and EXCITING update.  Driving on it first thing in the morning.
Congratulations Comma Team!
2018-07-13 01:56:01 -04:00
Vehicle Researcher 0ac89e92ae openpilot v0.5 release 2018-07-12 18:52:06 -07:00
Vehicle Researcher df2413e2d7 Merge opendbc subtree 2018-07-12 18:48:44 -07:00
Vehicle Researcher 5e977f42b3 Merge panda subtree 2018-07-12 18:48:43 -07:00
AlexMcInerney 3da91deed6 Added 2018 Chevy Volt Support with New Fingerprint (#283)
* Update values.py

* Add 2018 Volt Support Fingerprint
2018-07-06 16:29:31 -07:00
dekerr 6cdc2a8bc7 Small cleanup (#275)
* mass unit conversions

* flat/explicit conditions

* fix typos

* remove hardcode

* Update README.md

* Update carcontroller.py
2018-06-28 12:33:54 -07:00
Vehicle Researcher 16132b3aaa openpilot v0.4.7.2 release 2018-06-25 13:48:52 -07:00
Vehicle Researcher 00af220ee1 Merge opendbc subtree 2018-06-25 13:45:15 -07:00
Vehicle Researcher 0b4715a1b4 Merge panda subtree 2018-06-25 13:45:14 -07:00
Ted Slesinski 05ae05ce05 Add accord hybrid to fingerprint (#271) 2018-06-24 20:43:51 -07:00
Ted Slesinski 6c299f6f62 Adjusting Kp, Ki values to reduce steer oscillation on CRV_5G 2018-06-21 19:53:21 +02:00
Vehicle Researcher ec92462301 openpilot v0.4.7.1 release 2018-06-19 01:41:45 +00:00
Vehicle Researcher 7266508701 Merge opendbc subtree 2018-06-19 01:38:16 +00:00
rbiasini 16f124d385 Acura ILX steer fault fix: send STEER_TORQUE_REQUEST = 0 when temp faults are present (#264) 2018-06-17 23:35:05 -07:00
Vehicle Researcher 0d9734960e openpilot v0.4.7 release 2018-06-16 20:59:34 -07:00
Vehicle Researcher c8f4b4e420 Merge opendbc subtree 2018-06-16 20:56:04 -07:00
Vehicle Researcher 4920e69752 Merge panda subtree 2018-06-16 20:56:03 -07:00
Ted Slesinski e68afd7a08 Add missing messages fron Pilot EX-L to fingerprint (#260) 2018-06-06 10:20:38 -07:00
dekerr 0fe3e51115 Std unit conversions (#259)
* Added conversion constants

* implemented std unit conversion

* changed centerToFront ratio

Changed weight distribution ratios used to calc center of gravity distances to align closer to manufacturer specs

* implemented std unit conversion

* remove unused conversion

* reverted wheelbase conversion

slight change to pilot wheelbase

* removed redundant conversion

* removed incorrect/unused conversion

* removed class that now exists in honda/values.py

* redirect Cruisebuttons call

* redirect Cruisebuttons call

* Update interface.py

* Update numpy_fast.py

Refactor

* Update numpy_fast.py

* Update numpy_fast.py

-encapsulated get_interp 
-reduced calls to len() for iterable input
2018-06-04 12:39:54 -07:00
Tyler 2f641984d9 Update process_dbc.py 2018-05-31 20:16:08 +02:00
Vasily Tarasov 37ac143808 s/persistant/persistent/g (#254) 2018-05-30 13:40:18 -07:00
Willem Melching 0c959c062b clean git repo before neos update 2018-05-24 00:22:48 +02:00
Vehicle Researcher c6a761a06f openpilot v0.4.6 release 2018-05-23 03:59:04 +00:00
Vehicle Researcher e40ed2d6de Merge pyextra subtree 2018-05-23 03:55:35 +00:00
Vehicle Researcher ece216260e Merge opendbc subtree 2018-05-23 03:55:33 +00:00
Vehicle Researcher 5bff3e4bc3 Merge panda subtree 2018-05-23 03:55:30 +00:00
Vehicle Researcher ce0a47f674 openpilot v0.4.5.1 release 2018-05-01 23:19:47 +00:00
Vehicle Researcher 48de7ee011 openpilot v0.4.5 release 2018-04-28 09:44:39 +00:00
Vehicle Researcher e1387452be Merge opendbc subtree 2018-04-28 09:40:30 +00:00
Vehicle Researcher 045cc233c8 Merge panda subtree 2018-04-28 09:40:29 +00:00
Vehicle Researcher 624abefdb0 openpilot v0.4.4 release 2018-04-14 06:10:58 +00:00
Vehicle Researcher 2da8c42a82 Merge opendbc subtree 2018-04-14 06:06:43 +00:00
Vehicle Researcher c9253a8d52 Merge panda subtree 2018-04-14 06:06:42 +00:00
Ted Slesinski 703b05187d 2017 Honda Ridgeline (#198)
* Adds Honda Ridgeline

Replaced trim level placeholder

Adding 0x301 ridgeline message

(I restructured this slightly since we don't need to repeat `commands.append(make_can_msg(0x300, msg_0x300, idx, 1))` so many times

Updated dbc name

Use pedal_gas to detect gas pressed

Remove unnecessary signal check

Fix array notation

* Tire stiffness factor bumped to 1.5x

* Adds safety tests at line 133

* Revert "Adds safety tests at line 133"

This reverts commit 349edf5b1a879cac704db3786d0626211497bcb7.

* fix failing build due to syntax

* update variables for failing build

* Update interface.py

* Update Tire Slip Factor
2018-04-12 19:12:45 -07:00
Vehicle Researcher 9f59ef7516 openpilot v0.4.3.2 release 2018-03-31 07:54:47 +00:00
Vehicle Researcher 2352ad0bb0 Merge opendbc subtree 2018-03-31 07:29:19 +00:00
vanillagorillaa deab5888bb update year on civic 2018-03-22 23:34:47 +01:00
Willem Melching 80ed445604 fix bug in canpacker for Toyotas with DSU connected (#221) 2018-03-22 15:13:23 -07:00
Vehicle Researcher 2e591b3923 openpilot v0.4.3.1 release 2018-03-19 23:40:24 -07:00
Vehicle Researcher 5ddfd922fe openpilot v0.4.3 release 2018-03-18 10:36:29 -07:00
Vehicle Researcher 17c209da85 Merge opendbc subtree 2018-03-18 10:32:25 -07:00
Vehicle Researcher d55aa7b715 Merge panda subtree 2018-03-18 10:32:24 -07:00
George Hotz 6eca4b7b42 Merge pull request #192 from gregjhogan/wifi-only-upload-fix
fix restricting video upload to wifi
2018-03-17 12:01:42 -07:00
Vehicle Researcher 0a53d754af openpilot v0.4.3 release 2018-03-17 00:01:50 -07:00
Vehicle Researcher 75432db70d Merge opendbc subtree 2018-03-16 23:57:47 -07:00
Vehicle Researcher 38cac4d9a8 Merge panda subtree 2018-03-16 23:57:46 -07:00
Mark Krieger e9e884b0ee Slight changes to UI and Fingerprint for Odyssey Elite (#196)
* Adding back drive time to UI

* Add fingerprint for Odyssey Elite

* Removed extended fingerprint for Elite

* Revert "Adding back drive time to UI"

This reverts commit b9b02f7ff2511f28922f0bea47cd8c70bb9f4010.
2018-03-16 21:28:50 -07:00
Vasily Tarasov e311cb647f Interpolate ki/kp for steering PID loop (#200)
* Interpolate ki/kp for steering PID loop

Very much needed for the Volt port: car ping-pongs with low kp
on high speeeds, and the loop is unstable with high kp on
low speeds.

Also, removes "number or array?" logic from PIController,
now that all the callers use interpolation ofr ki/kp.

* Pass speed to steering PID loop for ki/kp interpolation

* Remove unused numbers import
2018-03-15 13:28:15 -07:00
arne182 48de5711c9 Update fingerprints.py (#210)
Consolidated my fingerprint and removed duplicates and ordered the fingerprint for the RAV4H. Double Checked.
2018-03-09 13:34:39 -08:00
George Hotz b7f4e0fb84 Merge pull request #203 from energee/safety-honda-bosch
Safety Reference for Honda Bosch
2018-03-08 08:33:31 -08:00
Ted Slesinski 5407485f96 Safety Reference for Honda Bosch 2018-02-28 10:24:05 -05:00
George Hotz 478012f716 Merge pull request #202 from vntarasov/volt-gm-id
Dibs on SAFETY_GM numerical value
2018-02-27 22:58:02 -08:00
Vasily Tarasov d0b952fbc5 Dibs on SAFETY_GM numerical value
To match Panda repo.
2018-02-26 10:22:19 -08:00
Greg Hogan 420631d588 fix restricting video upload to wifi 2018-02-10 09:31:56 -06:00
vanillagorillaa a102cc7c8c Honda Pilot 2017 Port (#161)
* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update interface.py

* Update interface.py

* Update README.md

* Update README.md

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update carstate.py

* Update hondacan.py

* Update README.md

* Update fingerprints.py

* Update carstate.py

* Update carstate.py

* Update carstate.py

* Update hondacan.py

* Update interface.py

* Update carstate.py

* Update carstate.py

* Update Pilot Fingerprint

* Update fingerprints.py

* Give pilot its own definition and not use ILX

* add pilot argument

* Add Pilot interface

* Add pilot argument

* Update interface.py

* Parse Different gear on pilot

* Add steer max

* Fixed duplication of steer max value

* Adjust PID's for steering

* Update carcontroller.py

* Change Steer Ratio and wheelbase

* Update Steer fault values

Steer fault value of 3, does not seem to effect anything

* Update Kp,Ki Ratio

* Update interface.py

* Update readme for Pilot

* add pilot

* Update fingerprints.py

* Update carstate.py

* add signals

* add signal
2018-02-09 12:50:37 -08:00
Vehicle Researcher ec46db033a openpilot v0.4.2 release 2018-02-06 12:43:45 -08:00
Vehicle Researcher 2446f64e45 Merge opendbc subtree 2018-02-06 12:39:39 -08:00
Vehicle Researcher 909cc30181 Merge panda subtree 2018-02-06 12:39:38 -08:00
vanillagorillaa c7bf1369d6 Acura RDX 2018 AcuraWatch Plus Port (#162)
* Adding Acura RDX alpha support
2018-02-05 18:38:40 -08:00
ErichMoraga c00bc15a2a Update fingerprints.py
Taiwanese Prius Prime fingerprint was identical to the regular prime (107 msgs.), but should really have 110.  I have the correct one in there now.
2018-02-05 14:16:58 -08:00
George Hotz 15aea578e0 openpilot v0.4.1 hotfix 2018-02-02 19:30:44 -08:00
George Hotz 0e60a6235d openpilot v0.4.1 tweaks 2018-01-30 21:34:01 -08:00
Vehicle Researcher 0250a1aa64 openpilot v0.4.1 release 2018-01-30 12:58:14 -08:00
Vehicle Researcher 4dc2cccd48 Merge opendbc subtree 2018-01-30 12:54:13 -08:00
Vehicle Researcher dcf112237f Merge panda subtree 2018-01-30 12:54:12 -08:00
George Hotz 3368e23a5b Merge pull request #155 from slesinski/odyssey-port
Honda Odyssey 2018 EX-L with Honda Sensing
2018-01-18 21:49:14 -08:00
Ted Slesinski fcddfab737 Unnecessary characters in comma's dongle id 2018-01-19 00:47:47 -05:00
Ted Slesinski 684a20da1d SteerRatio should be 14.35 2018-01-19 00:37:32 -05:00
Ted Slesinski c0b865aa07 Added the extra carstate reads 2018-01-19 00:34:02 -05:00
Ted Slesinski 9bac947c5d Tuning specific to odyssey 2018-01-19 00:34:02 -05:00
Ted Slesinski a0fa4b6bcc Gear shifter values like acura 2018-01-19 00:32:51 -05:00
Ted Slesinski c5024a837d Car_gas 130 missing canbus, using 17c 2018-01-19 00:32:51 -05:00
Ted Slesinski c00f90638d BRAKE_HOLD signal not ready yet 2018-01-19 00:32:51 -05:00
Ted Slesinski d8b3a0220a Park Brake not yet in DBC 2018-01-19 00:32:51 -05:00
Ted Slesinski eca5067f2b Wrong value for MAIN_ON 2018-01-19 00:32:51 -05:00
Ted Slesinski c31e56727a Packet size off on a fingerprint id 2018-01-19 00:32:51 -05:00
Ted Slesinski 63dce92056 Add hondacan changes 2018-01-19 00:30:33 -05:00
Ted Slesinski b599d835aa Add carcontroller changes 2018-01-19 00:30:33 -05:00
Ted Slesinski 981871c512 Add odyssey car params to interface 2018-01-19 00:30:33 -05:00
Ted Slesinski d4b8088969 Add carstate changes 2018-01-19 00:30:33 -05:00
Ted Slesinski 0fd3ea3b1a Add odyssey fingerprint 2018-01-19 00:30:33 -05:00
Vehicle Researcher 176edf427e openpilot v0.4.0.2 release 2018-01-18 15:46:12 -08:00
Vehicle Researcher 87d313e132 Merge opendbc subtree 2018-01-18 15:42:13 -08:00
Vehicle Researcher 252e8d57ce Merge panda subtree 2018-01-18 15:42:12 -08:00
Vehicle Researcher 6b1716a43c openpilot v0.4.0.1 tweaks 2018-01-16 23:26:39 -08:00
heatnation 23fe981cd5 Update fingerprints.py 2018-01-15 18:22:15 -08:00
Vehicle Researcher 68ffef7ae8 openpilot v0.4.0.1 release 2017-12-23 17:15:27 -08:00
Vehicle Researcher ef1227777f Merge commit '57b9ddf20ef28d7a9b4fd57c08630281ef103422' as 'pyextra' 2017-12-23 17:10:45 -08:00
Vehicle Researcher 94c28dd0a0 Merge commit 'ba97d0e83837b4c893edc609001dde7c41b8e24b' as 'opendbc' 2017-12-23 17:10:44 -08:00
Vehicle Researcher 36c3fc1842 Merge commit 'c251b312d87d26b5ed347b267f6f1570793f9b91' as 'panda' 2017-12-23 17:10:42 -08:00
Vehicle Researcher 73a0364d24 remove submodules 2017-12-23 17:06:56 -08:00
Vehicle Researcher 9bb5274201 openpilot v0.3.9 tweaks 2017-12-06 12:48:00 -08:00
Vehicle Researcher 4ad0e4c24c openpilot v0.3.9 release 2017-11-22 04:30:24 -08:00
Vehicle Researcher cf7a5b9b7c update releases 2017-11-04 05:31:15 -07:00
Vehicle Researcher d07b14657e openpilot v0.3.8.2 tweaks 2017-11-03 18:21:38 -07:00
Vehicle Researcher e9e57ebc4d openpilot v0.3.8.2 release 2017-10-31 02:27:39 -07:00
Vehicle Researcher 61c2994880 openpilot v0.3.7 tweaks 2017-10-03 23:46:23 -07:00
Vehicle Researcher 629d2b8af4 openpilot v0.3.7 tweaks 2017-10-03 00:35:46 -07:00
George Hotz 8b7486f5c0 Bump panda version to fix old board updating 2017-09-30 23:30:38 -07:00
Vehicle Researcher 471024f7b7 openpilot v0.3.7 release 2017-09-30 19:05:03 -07:00
espes d6dca124a7 Fix rear view mirror setting 2017-08-28 22:24:11 -07:00
Vehicle Researcher d9f8719f51 openpilot v0.3.6.1 tweaks 2017-08-16 05:21:06 -07:00
Vehicle Researcher be014c1b23 openpilot v0.3.6.1 release 2017-08-15 03:15:00 -07:00
Vehicle Researcher 6bd42e1d92 openpilot v0.3.6 tweaks 2017-08-10 20:38:56 -07:00
Vehicle Researcher efac35a337 openpilot v0.3.6 release 2017-08-09 17:41:38 -07:00
Vehicle Researcher d297393649 openpilot v0.3.5 release 2017-07-30 17:59:37 -07:00
Vehicle Researcher 93df8edcf6 openpilot v0.3.4 tweaks 2017-07-28 20:51:27 -07:00
Vehicle Researcher 8cc5a0802d openpilot v0.3.4 release 2017-07-28 03:23:57 -07:00
George Hotz b1c272b893 Merge pull request #116 from commaai/revert-114-new_panda_code
Revert "Pulled in new panda firmware and updated boardd to support the changes."
2017-07-17 23:17:13 -07:00
George Hotz 9f0e201537 Revert "Pulled in new panda firmware and updated boardd to support the changes." 2017-07-17 23:16:57 -07:00
George Hotz 753f81a9f2 Merge pull request #114 from diamondman/new_panda_code
Pulled in new panda firmware and updated boardd to support the changes.
2017-07-11 22:24:38 -07:00
Jessy Diamond Exum 8162b0833c Removed unnecessary TODO 2017-07-11 22:01:04 -07:00
Jessy Diamond Exum 93e322a9a0 Moved boardd loopback config to envvar. 2017-07-11 21:59:03 -07:00
Jessy Diamond Exum 8e0cd2fd3b Pulled in new panda firmware and updated boardd to support the changes. 2017-07-11 21:45:16 -07:00
George Hotz 28b00c1086 Merge pull request #113 from pjlao307/update-alert-text
Update alert text
2017-07-07 10:25:59 -07:00
Joey Lao 8a760b4bb5 Update steering controls saturated message 2017-07-06 22:36:55 -07:00
pjlao307 3b9ebd43db Merge pull request #2 from commaai/release
Release
2017-07-03 11:15:42 -07:00
George Hotz 4a145a3415 Merge pull request #109 from commaai/devel
openpilot 0.3.3
2017-06-30 18:23:10 -07:00
Vehicle Researcher f558179f1e openpilot v0.3.3 release 2017-06-28 13:57:09 -07:00
George Hotz 3e4854e7e6 Merge pull request #102 from energee/devel-crv
Bounty: 2016 Honda CR-V Touring
2017-06-22 11:52:38 -07:00
Ted Slesinski bc57d65c36 Addresses brake error review comment 2017-06-20 02:51:58 -04:00
Ted Slesinski 5bbdee5b1d Fixes global saturation change 2017-06-20 02:47:47 -04:00
Ted Slesinski df363ff0c3 Adds correct value of 8 to gearshifter check array 2017-06-20 02:46:59 -04:00
Ted Slesinski d417e4b8aa Init crv variable 2017-06-20 02:26:50 -04:00
George Hotz 7b9791660d Merge pull request #103 from pjlao307/pjlao-update-ui
Update UI to make text more readable in all conditions as requested by community
2017-06-19 20:37:37 -07:00
Joey Lao 8cd9767a99 Make lead car text a little brighter 2017-06-12 16:39:10 -07:00
Vehicle Researcher 70467635f7 Revert last commit since KPH can get 3 digits long 2017-06-12 09:30:47 -07:00
Vehicle Researcher 83ceffbf87 Adjust position of left speed to align with label (based on 2 digit speeds) 2017-06-12 09:03:49 -07:00
Vehicle Researcher c449945b6c More code cleanup 2017-06-12 08:41:11 -07:00
Vehicle Researcher 161a8e8184 Use color param in ui_draw_rounded_rect instead of hard coding 2017-06-12 08:27:57 -07:00
Vehicle Researcher af90994b1e Add background to radar text. Code cleanup. 2017-06-12 08:19:47 -07:00
John Jones 1aebd13649 missed one update in latcontrol 2017-06-11 21:33:44 -04:00
Vehicle Researcher c43d143744 Clean up code 2017-06-11 15:18:39 -07:00
Vehicle Researcher fd1a382f99 Remove commented line 2017-06-11 15:16:46 -07:00
Vehicle Researcher e1c419d845 Update UI to make speed text more readable in all conditions as requested by community 2017-06-11 15:12:50 -07:00
John Jones ab03b47fc3 adding steering change from video and removing integer div and adding ki/kp changes 2017-06-11 13:20:19 -04:00
Ted Slesinski 70a192348f Reverting steering to original value 2017-06-08 13:15:30 -04:00
Ted Slesinski 0bae1a40d1 Syntax typo 2017-06-08 02:33:31 -04:00
Ted Slesinski 5a8384a048 Adds support for 2016 Honda CR-V Touring 2017-06-08 01:37:39 -04:00
Vehicle Researcher 1d87a0a350 openpilot v0.3.2 release 2017-05-22 22:26:12 -07:00
George Hotz 55ed5a1153 Merge pull request #82 from energee/devel
DBC file for 2017 Honda CR-V
2017-05-22 09:00:44 -07:00
Ted Slesinski 01c20c31c2 Adds 2017 CR-V dbc file 2017-05-21 19:46:34 -04:00
Vehicle Researcher 4479d4000e openpilot v0.3.1 release 2017-05-17 00:40:33 -07:00
Vehicle Researcher edd511f06e openpilot v0.3.0 release 2017-05-12 16:46:20 -07:00
Vehicle Researcher 8ef3f520b1 openpilot v0.3.0-devel release 2017-05-11 12:41:17 -07:00
280 changed files with 51047 additions and 99777 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ selfdrive/sensord/_gpsd
selfdrive/sensord/_sensord
selfdrive/camerad/camerad
selfdrive/modeld/_modeld
selfdrive/modeld/_monitoringd
selfdrive/modeld/_dmonitoringmodeld
/src/
one
+9
View File
@@ -29,3 +29,12 @@ Code is automatically check for style by travis as part of the automated tests.
We've released a [Model Port guide](https://medium.com/@comma_ai/openpilot-port-guide-for-toyota-models-e5467f4b5fe6) for porting to Toyota/Lexus models.
If you port openpilot to a substantially new car brand, see this more generic [Brand Port guide](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84). You might also be eligible for a bounty. See our bounties at [comma.ai/bounties.html](https://comma.ai/bounties.html)
## Pull Requests
Pull requests should be against the master branch. Before running master on in-car hardware, you'll need to run
```
git submodule init
git submodule update
```
in order to pull down the submodules, such as `panda` and `opendbc`.
-84
View File
@@ -1,84 +0,0 @@
FROM ubuntu:16.04
ENV PYTHONUNBUFFERED 1
RUN apt-get update && apt-get install -y \
autoconf \
build-essential \
bzip2 \
clang \
cmake \
curl \
ffmpeg \
git \
libarchive-dev \
libbz2-dev \
libcurl4-openssl-dev \
libeigen3-dev \
libffi-dev \
libglew-dev \
libgles2-mesa-dev \
libglfw3-dev \
libglib2.0-0 \
liblzma-dev \
libmysqlclient-dev \
libomp-dev \
libopencv-dev \
libssl-dev \
libsqlite3-dev \
libtool \
libusb-1.0-0-dev \
libzmq5-dev \
locales \
ocl-icd-libopencl1 \
ocl-icd-opencl-dev \
opencl-headers \
python-dev \
python-pip \
screen \
sudo \
vim \
wget
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}"
RUN pyenv install 3.7.3
RUN pyenv global 3.7.3
RUN pyenv rehash
RUN pip install pipenv==2018.11.26
COPY Pipfile /tmp/
COPY Pipfile.lock /tmp/
RUN python --version
RUN cd /tmp && pipenv install --system --deploy
# Install subset of dev dependencies needed for CI
RUN pip install matplotlib==3.1.1 dictdiffer==0.8.0 fastcluster==1.1.25 aenum==2.2.1 scipy==1.3.1 lru-dict==1.1.6 tenacity==5.1.1 azure-common==1.1.23 azure-nspkg==3.0.2 azure-storage-blob==2.1.0 azure-storage-common==2.1.0 azure-storage-nspkg==3.1.0 pycurl==7.43.0.3
COPY phonelibs/install_capnp.sh /tmp/install_capnp.sh
RUN /tmp/install_capnp.sh
RUN git clone --branch v0.7 https://github.com/commaai/openpilot-tools.git /tmp/openpilot/tools
ENV PYTHONPATH /tmp/openpilot:${PYTHONPATH}
COPY ./.pylintrc /tmp/openpilot/.pylintrc
COPY ./common /tmp/openpilot/common
COPY ./cereal /tmp/openpilot/cereal
COPY ./opendbc /tmp/openpilot/opendbc
COPY ./selfdrive /tmp/openpilot/selfdrive
COPY ./phonelibs /tmp/openpilot/phonelibs
COPY ./pyextra /tmp/openpilot/pyextra
COPY ./panda /tmp/openpilot/panda
COPY SConstruct /tmp/openpilot/SConstruct
RUN mkdir -p /tmp/openpilot/selfdrive/test/out
RUN cd /tmp/openpilot && scons -j$(nproc)
-9
View File
@@ -1,9 +0,0 @@
code_dir := $(shell pwd)
# TODO: Add a global build system
.PHONY: all
all:
cd selfdrive && PYTHONPATH=$(code_dir) PREPAREONLY=1 ./manager.py
-128
View File
@@ -1,128 +0,0 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
opencv-python= "==3.4.2.17"
PyQt5 = "*"
ipython = "*"
networkx = "==2.3"
azure-core = "==1.1.1"
azure-common = "==1.1.24"
azure-nspkg = "==3.0.2"
azure-storage-blob = "==2.1.0"
azure-storage-common = "==2.1.0"
azure-storage-nspkg = "==3.1.0"
boto = "*"
"boto3" = "*"
control = "*"
datadog = "*"
dlib = "*"
elasticsearch = "*"
future = "*"
futures = "*"
pycocotools = {git = "https://github.com/cocodataset/cocoapi.git",subdirectory = "PythonAPI"}
gunicorn = "*"
"h5py" = "*"
hexdump = "*"
"html5lib" = "*"
imageio = "*"
ipykernel = "*"
joblib = "*"
json-logging-py = "*"
jupyter = "*"
libarchive = "*"
lru-dict = "*"
"mpld3" = "*"
msgpack-python = "*"
nbstripout = "*"
numpy = "*"
osmium = "*"
pbr = "*"
percache = "*"
pprofile = "*"
pycurl = "*"
git-pylint-commit-hook = "*"
pymongo = "*"
"pynmea2" = "*"
pypolyline = "*"
python-logstash = "*"
redis = "*"
"s2sphere" = "*"
scikit-image = "*"
"subprocess32" = "*"
tenacity = "*"
tensorflow-gpu = ""
PyJWT = "==1.4.1"
PyMySQL = "==0.9.2"
Werkzeug = "*"
"backports.lzma" = "*"
Flask-Cors = "*"
Flask-SocketIO = "*"
"GeoAlchemy2" = "*"
Pygments = "*"
PyNaCl = "*"
"PySDL2" = "*"
reverse_geocoder = "*"
Shapely = "*"
SQLAlchemy = "*"
scipy = "*"
fastcluster = "*"
backports-abc = "*"
pygame = "*"
simplejson = "*"
python-logstash-async = "*"
seaborn = "*"
pyproj = "*"
mock = "*"
matplotlib = "*"
dictdiffer = "*"
aenum = "*"
coverage = "*"
azure-cli-core = "*"
[packages]
overpy = {git = "https://github.com/commaai/python-overpy.git",ref = "f86529af402d4642e1faeb146671c40284007323"}
atomicwrites = "*"
cffi = "*"
crcmod = "*"
hexdump = "*"
libusb1 = "*"
numpy = "*"
psutil = "*"
pycapnp = "*"
cryptography = "*"
pyserial = "*"
python-dateutil = "*"
pyzmq = "*"
raven = "*"
requests = "*"
setproctitle = "*"
six = "*"
smbus2 = "*"
sympy = "*"
tqdm = "*"
Cython = "*"
PyYAML = "*"
websocket_client = "*"
Logentries = {git = "https://github.com/commaai/le_python.git",ref = "feaeacb48f7f4bdb02c0a8fc092326d4e101b7f2"}
urllib3 = "*"
chardet = "*"
idna = "*"
gunicorn = "*"
utm = "*"
json-rpc = "*"
Flask = "*"
PyJWT = "*"
"Jinja2" = "*"
nose = "*"
flake8 = "*"
pylint = "*"
pycryptodome = "*"
pillow = "*"
scons = "*"
cysignals = "*"
[requires]
python_version = "3.7.3"
Generated
-2895
View File
File diff suppressed because it is too large Load Diff
+12 -8
View File
@@ -1,4 +1,4 @@
[![](https://i.imgur.com/UetIFyH.jpg)](#)
[![](https://i.imgur.com/UelUjKAh.png)](#)
Table of Contents
=======================
@@ -68,12 +68,12 @@ Supported Cars
| Acura | RDX 2016-18 | AcuraWatch Plus | openpilot | 25mph<sup>5</sup> | 12mph |
| Chrysler | Pacifica 2017-18 | Adaptive Cruise | Stock | 0mph | 9mph |
| Chrysler | Pacifica Hybrid 2017-18 | Adaptive Cruise | Stock | 0mph | 9mph |
| Chrysler | Pacifica Hybrid 2019 | Adaptive Cruise | Stock | 0mph | 39mph |
| Chrysler | Pacifica Hybrid 2019-20 | Adaptive Cruise | Stock | 0mph | 39mph |
| Honda | Accord 2018-19 | All | Stock | 0mph | 3mph |
| Honda | Accord Hybrid 2018-19 | All | Stock | 0mph | 3mph |
| Honda | Civic Hatchback 2017-19 | Honda Sensing | Stock | 0mph | 12mph |
| Honda | Civic Sedan/Coupe 2016-18 | Honda Sensing | openpilot | 0mph | 12mph |
| Honda | Civic Sedan/Coupe 2019 | Honda Sensing | Stock | 0mph | 2mph |
| Honda | Civic Hatchback 2017-19 | Honda Sensing | Stock | 0mph | 12mph |
| Honda | CR-V 2015-16 | Touring | openpilot | 25mph<sup>5</sup> | 12mph |
| Honda | CR-V 2017-19 | Honda Sensing | Stock | 0mph | 12mph |
| Honda | CR-V Hybrid 2017-2019 | Honda Sensing | Stock | 0mph | 12mph |
@@ -83,19 +83,22 @@ Supported Cars
| Honda | Pilot 2016-18 | Honda Sensing | openpilot | 25mph<sup>5</sup> | 12mph |
| Honda | Pilot 2019 | All | openpilot | 25mph<sup>5</sup> | 12mph |
| Honda | Ridgeline 2017-19 | Honda Sensing | openpilot | 25mph<sup>5</sup> | 12mph |
| Hyundai | Santa Fe 2019<sup>1</sup> | All | Stock | 0mph | 0mph |
| Hyundai | Elantra 2017-19<sup>1</sup> | SCC + LKAS | Stock | 19mph | 34mph |
| Hyundai | Genesis 2018<sup>1</sup> | All | Stock | 19mph | 34mph |
| Hyundai | Santa Fe 2019<sup>1</sup> | All | Stock | 0mph | 0mph |
| Jeep | Grand Cherokee 2016-18 | Adaptive Cruise | Stock | 0mph | 9mph |
| Jeep | Grand Cherokee 2019 | Adaptive Cruise | Stock | 0mph | 39mph |
| Kia | Optima 2019<sup>1</sup> | SCC + LKAS | Stock | 0mph | 0mph |
| Kia | Sorento 2018<sup>1</sup> | All | Stock | 0mph | 0mph |
| Kia | Stinger 2018<sup>1</sup> | SCC + LKAS | Stock | 0mph | 0mph |
| Lexus | CT Hybrid 2017-18 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Lexus | ES 2019 | All | openpilot | 0mph | 0mph |
| Lexus | ES Hybrid 2019 | All | openpilot | 0mph | 0mph |
| Lexus | RX Hybrid 2016-19 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Lexus | IS 2017-2019 | All | Stock | 22mph | 0mph |
| Lexus | IS Hybrid 2017 | All | Stock | 0mph | 0mph |
| Lexus | RX 2016-17 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Lexus | RX 2020 | All | openpilot | 0mph | 0mph |
| Lexus | RX Hybrid 2016-19 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Subaru | Crosstrek 2018-19 | EyeSight | Stock | 0mph | 0mph |
| Subaru | Impreza 2019-20 | EyeSight | Stock | 0mph | 0mph |
| Toyota | Avalon 2016 | TSS-P | Stock<sup>4</sup>| 20mph<sup>5</sup> | 0mph |
@@ -106,7 +109,7 @@ Supported Cars
| Toyota | C-HR Hybrid 2017-19 | All | Stock | 0mph | 0mph |
| Toyota | Corolla 2017-19 | All | Stock<sup>4</sup>| 20mph<sup>5</sup> | 0mph |
| Toyota | Corolla 2020 | All | openpilot | 0mph | 0mph |
| Toyota | Corolla Hatchback 2019 | All | openpilot | 0mph | 0mph |
| Toyota | Corolla Hatchback 2019-20 | All | openpilot | 0mph | 0mph |
| Toyota | Corolla Hybrid 2020 | All | openpilot | 0mph | 0mph |
| Toyota | Highlander 2017-19 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Toyota | Highlander Hybrid 2017-19 | All | Stock<sup>4</sup>| 0mph | 0mph |
@@ -118,6 +121,7 @@ Supported Cars
| Toyota | Rav4 2019 | All | openpilot | 0mph | 0mph |
| Toyota | Rav4 Hybrid 2016 | TSS-P | Stock<sup>4</sup>| 0mph | 0mph |
| Toyota | Rav4 Hybrid 2017-18 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Toyota | Rav4 Hybrid 2019-20 | All | openpilot | 0mph | 0mph |
| Toyota | Sienna 2018 | All | Stock<sup>4</sup>| 0mph | 0mph |
| Volkswagen| Golf 2016-19<sup>3</sup> | Driver Assistance | Stock | 0mph | 0mph |
@@ -131,9 +135,9 @@ Community Maintained Cars and Features
| Make | Model (US Market Reference) | Supported Package | ACC | No ACC accel below | No ALC below |
| ----------| ------------------------------| ------------------| -----------------| -------------------| -------------|
| Buick | Regal 2018<sup>6</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
| Cadillac | ATS 2018<sup>6</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
| Chevrolet | Malibu 2017<sup>6</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
| Chevrolet | Volt 2017-18<sup>6</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
| Cadillac | ATS 2018<sup>6</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
| GMC | Acadia Denali 2018<sup>6</sup>| Adaptive Cruise | openpilot | 0mph | 7mph |
| Holden | Astra 2017<sup>6</sup> | Adaptive Cruise | openpilot | 0mph | 7mph |
@@ -242,7 +246,7 @@ Safety and Testing
Testing on PC
------
Check out [openpilot-tools](https://github.com/commaai/openpilot-tools): lots of tools you can use to replay driving data, test and develop openpilot from your pc.
Check out the tools directory in master: lots of tools you can use to replay driving data, test and develop openpilot from your pc.
Community and Contributing
------
+9
View File
@@ -1,3 +1,12 @@
Version 0.7.2 (2020-02-07)
========================
* ECU firmware version based fingerprinting for Honda & Toyota
* New driving model: improved path prediction during turns and lane changes and better lead speed tracking
* Improve driver monitoring under extreme lighting and add low accuracy alert
* Support for 2019 Rav4 Hybrid thanks to illumiN8i!
* Support for 2016, 2017 and 2020 Lexus RX thanks to illumiN8i!
* Support for 2020 Chrysler Pacifica Hybrid thanks to adhintz!
Version 0.7.1 (2020-01-20)
========================
* comma two support!
+33 -18
View File
@@ -1,6 +1,7 @@
import os
import subprocess
import sys
import platform
AddOption('--test',
action='store_true',
@@ -11,6 +12,8 @@ AddOption('--asan',
help='turn on ASAN')
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
if platform.system() == "Darwin":
arch = "Darwin"
if arch == "aarch64":
lenv = {
@@ -29,7 +32,6 @@ if arch == "aarch64":
"/data/data/com.termux/files/usr/lib",
"/system/vendor/lib64",
"/system/comma/usr/lib",
"#phonelibs/yaml-cpp/lib",
"#phonelibs/nanovg",
"#phonelibs/libyuv/lib",
]
@@ -48,22 +50,34 @@ else:
"#phonelibs/zmq/x64/include",
"#external/tensorflow/include",
]
libpath = [
"#phonelibs/capnp-cpp/x64/lib",
"#phonelibs/capnp-c/x64/lib",
"#phonelibs/yaml-cpp/x64/lib",
"#phonelibs/snpe/x86_64-linux-clang",
"#phonelibs/zmq/x64/lib",
"#phonelibs/libyuv/x64/lib",
"#external/zmq/lib",
"#external/tensorflow/lib",
"#cereal",
"#selfdrive/common",
"/usr/lib",
"/usr/local/lib",
]
if arch == "Darwin":
libpath = [
"#phonelibs/capnp-cpp/mac/lib",
"#phonelibs/capnp-c/mac/lib",
"#phonelibs/libyuv/mac/lib",
"#cereal",
"#selfdrive/common",
"/usr/local/lib",
"/System/Library/Frameworks/OpenGL.framework/Libraries",
]
else:
libpath = [
"#phonelibs/capnp-cpp/x64/lib",
"#phonelibs/capnp-c/x64/lib",
"#phonelibs/snpe/x86_64-linux-clang",
"#phonelibs/zmq/x64/lib",
"#phonelibs/libyuv/x64/lib",
"#external/zmq/lib",
"#external/tensorflow/lib",
"#cereal",
"#selfdrive/common",
"/usr/lib",
"/usr/local/lib",
]
rpath = ["phonelibs/capnp-cpp/x64/lib",
"phonelibs/zmq/x64/lib",
"external/tensorflow/lib",
"cereal",
"selfdrive/common"]
@@ -98,7 +112,6 @@ env = Environment(
"#selfdrive",
"#phonelibs/bzip2",
"#phonelibs/libyuv/include",
"#phonelibs/yaml-cpp/include",
"#phonelibs/openmax/include",
"#phonelibs/json/src",
"#phonelibs/json11",
@@ -195,8 +208,10 @@ SConscript(['common/SConscript'])
SConscript(['common/kalman/SConscript'])
SConscript(['phonelibs/SConscript'])
SConscript(['selfdrive/modeld/SConscript'])
SConscript(['selfdrive/camerad/SConscript'])
if arch != "Darwin":
SConscript(['selfdrive/camerad/SConscript'])
SConscript(['selfdrive/modeld/SConscript'])
SConscript(['selfdrive/controls/lib/cluster/SConscript'])
SConscript(['selfdrive/controls/lib/lateral_mpc/SConscript'])
SConscript(['selfdrive/controls/lib/longitudinal_mpc/SConscript'])
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+20 -7
View File
@@ -90,14 +90,15 @@ struct CarEvent @0x9b1657f34caf3ad3 {
ldw @65;
carUnrecognized @66;
radarCommIssue @67;
driverMonitorLowAcc @68;
# dragonpilot
manualSteeringRequired @68;
manualSteeringRequiredBlinkersOn @69;
leadCarMoving @70;
leadCarDetected @71;
preAutoLaneChangeLeft @72;
preAutoLaneChangeRight @73;
autoLaneChange @74;
manualSteeringRequired @69;
manualSteeringRequiredBlinkersOn @70;
leadCarMoving @71;
leadCarDetected @72;
preAutoLaneChangeLeft @73;
preAutoLaneChangeRight @74;
autoLaneChange @75;
}
}
@@ -353,6 +354,7 @@ struct CarParams {
tireStiffnessRear @24 :Float32; # [N/rad] rear tire coeff of stiff
longitudinalTuning @25 :LongitudinalPIDTuning;
lateralParams @48 :LateralParams;
lateralTuning :union {
pid @26 :LateralPIDTuning;
indi @27 :LateralINDITuning;
@@ -379,6 +381,12 @@ struct CarParams {
carFw @44 :List(CarFw);
radarTimeStep @45: Float32 = 0.05; # time delta between radar updates, 20Hz is very standard
communityFeature @46: Bool; # true if a community maintained feature is detected
fingerprintSource @49: FingerprintSource;
struct LateralParams {
torqueBP @0 :List(Int32);
torqueV @1 :List(Int32);
}
struct LateralPIDTuning {
kpBP @0 :List(Float32);
@@ -473,4 +481,9 @@ struct CarParams {
dsu @6;
apgs @7;
}
enum FingerprintSource {
can @0;
fw @1;
}
}
+56 -4
View File
@@ -279,6 +279,7 @@ struct ThermalData {
batteryCurrent @15 :Int32;
batteryVoltage @16 :Int32;
usbOnline @12 :Bool;
networkType @22 :NetworkType;
fanSpeed @10 :UInt16;
started @11 :Bool;
@@ -291,7 +292,7 @@ struct ThermalData {
memUsedPercent @19 :Int8;
cpuPerc @20 :Int8;
ipAddr @22 :Text; # dragonpilot
ipAddr @23 :Text; # dragonpilot
enum ThermalStatus {
green @0; # all processes run
@@ -299,6 +300,15 @@ struct ThermalData {
red @2; # no engage, will disengage
danger @3; # immediate process shutdown
}
enum NetworkType {
none @0;
wifi @1;
cell2G @2;
cell3G @3;
cell4G @4;
cell5G @5;
}
}
struct HealthData {
@@ -1426,6 +1436,7 @@ struct UbloxGnss {
measurementReport @0 :MeasurementReport;
ephemeris @1 :Ephemeris;
ionoData @2 :IonoData;
hwStatus @3 :HwStatus;
}
struct MeasurementReport {
@@ -1549,8 +1560,29 @@ struct UbloxGnss {
healthValid @5 :Bool;
ionoCoeffsValid @6 :Bool;
}
}
struct HwStatus {
noisePerMS @0 :UInt16;
agcCnt @1 :UInt16;
aStatus @2 :AntennaSupervisorState;
aPower @3 :AntennaPowerStatus;
jamInd @4 :UInt8;
enum AntennaSupervisorState {
init @0;
dontknow @1;
ok @2;
short @3;
open @4;
}
enum AntennaPowerStatus {
off @0;
on @1;
dontknow @2;
}
}
}
struct Clocks {
bootTimeNanos @0 :UInt64;
@@ -1758,7 +1790,7 @@ struct OrbKeyFrame {
descriptors @3 :Data;
}
struct DriverMonitoring {
struct DriverState {
frameId @0 :UInt32;
descriptorDEPRECATED @1 :List(Float32);
stdDEPRECATED @2 :Float32;
@@ -1774,6 +1806,25 @@ struct DriverMonitoring {
facePositionStd @12 :List(Float32);
}
struct DMonitoringState {
# TODO: deprecate old fields in controlsState
events @0 :List(Car.CarEvent);
faceDetected @1 :Bool;
isDistracted @2 :Bool;
awarenessStatus @3 :Float32;
isRHD @4 :Bool;
rhdChecked @5 :Bool;
posePitchOffset @6 :Float32;
posePitchValidCount @7 :UInt32;
poseYawOffset @8 :Float32;
poseYawValidCount @9 :UInt32;
stepChange @10 :Float32;
awarenessActive @11 :Float32;
awarenessPassive @12 :Float32;
isLowStd @13 :Bool;
hiStdCount @14 :UInt32;
}
struct Boot {
wallTimeNanos @0 :UInt64;
lastKmsg @1 :Data;
@@ -1893,7 +1944,7 @@ struct Event {
orbKeyFrame @56 :OrbKeyFrame;
uiLayoutState @57 :UiLayoutState;
orbFeaturesSummary @58 :OrbFeaturesSummary;
driverMonitoring @59 :DriverMonitoring;
driverState @59 :DriverState;
boot @60 :Boot;
liveParameters @61 :LiveParametersData;
liveMapData @62 :LiveMapData;
@@ -1904,5 +1955,6 @@ struct Event {
carEvents @68: List(Car.CarEvent);
carParams @69: Car.CarParams;
frontFrame @70: FrameData;
dMonitoringState @71: DMonitoringState;
}
}
+3 -2
View File
@@ -65,16 +65,17 @@ orbKeyFrame: [8059, true, 0.]
uiLayoutState: [8060, true, 0.]
frontEncodeIdx: [8061, true, 5.]
orbFeaturesSummary: [8062, true, 0.]
driverMonitoring: [8063, true, 5., 1]
driverState: [8063, true, 5., 1]
liveParameters: [8064, true, 10.]
liveMapData: [8065, true, 0.]
cameraOdometry: [8066, true, 20.]
cameraOdometry: [8066, true, 20., 5]
pathPlan: [8067, true, 20.]
kalmanOdometry: [8068, true, 0.]
thumbnail: [8069, true, 0.2, 1]
carEvents: [8070, true, 1., 1]
carParams: [8071, true, 0.02, 1]
frontFrame: [8072, true, 10.]
dMonitoringState: [8073, true, 5., 1]
testModel: [8040, false, 0.]
testLiveLocation: [8045, false, 0.]
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
# Only pyflakes checks (--select=F)
flake8 --select=F $(find . -iname "*.py" | grep -vi "^\./pyextra.*" | grep -vi "^\./panda")
RESULT=$?
if [ $RESULT -eq 0 ]; then
pylint $(find . -iname "*.py" | grep -vi "^\./pyextra.*" | grep -vi "^\./panda")
RESULT=$? & 3
fi
[ $RESULT -ne 0 ] && exit 1
exit 0
+39
View File
@@ -5,6 +5,9 @@ import re
import struct
import subprocess
import random
from cereal import log
NetworkType = log.ThermalData.NetworkType
ANDROID = os.path.isfile('/EON')
@@ -89,3 +92,39 @@ def parse_service_call_bytes(ret):
return r
except Exception:
return None
def get_network_type():
if not ANDROID:
return NetworkType.none
wifi_check = parse_service_call_string(service_call(["connectivity", "2"]))
if wifi_check is None:
return NetworkType.none
elif 'WIFI' in wifi_check:
return NetworkType.wifi
else:
cell_check = parse_service_call_unpack(service_call(['phone', '59']), ">q")
# from TelephonyManager.java
cell_networks = {
0: NetworkType.none,
1: NetworkType.cell2G,
2: NetworkType.cell2G,
3: NetworkType.cell3G,
4: NetworkType.cell2G,
5: NetworkType.cell3G,
6: NetworkType.cell3G,
7: NetworkType.cell3G,
8: NetworkType.cell3G,
9: NetworkType.cell3G,
10: NetworkType.cell3G,
11: NetworkType.cell2G,
12: NetworkType.cell3G,
13: NetworkType.cell4G,
14: NetworkType.cell4G,
15: NetworkType.cell3G,
16: NetworkType.cell2G,
17: NetworkType.cell3G,
18: NetworkType.cell4G,
19: NetworkType.cell4G
}
return cell_networks.get(cell_check, NetworkType.none)
+2 -2
View File
@@ -1,13 +1,13 @@
import jwt
import requests
from datetime import datetime, timedelta
from common.basedir import PERSIST
from selfdrive.version import version
class Api():
def __init__(self, dongle_id):
self.dongle_id = dongle_id
with open('/persist/comma/id_rsa') as f:
with open(PERSIST+'/comma/id_rsa') as f:
self.private_key = f.read()
def get(self, *args, **kwargs):
+7
View File
@@ -1,4 +1,11 @@
import os
BASEDIR = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../"))
from common.android import ANDROID
if ANDROID:
PERSIST = "/persist"
PARAMS = "/data/params"
else:
PERSIST = os.path.join(BASEDIR, "persist")
PARAMS = os.path.join(BASEDIR, "persist", "params")
+15 -9
View File
@@ -1,16 +1,22 @@
from posix.time cimport clock_gettime, timespec, CLOCK_BOOTTIME, CLOCK_MONOTONIC_RAW
from posix.time cimport clock_gettime, timespec, CLOCK_MONOTONIC_RAW, clockid_t
cdef double readclock(int clock_id):
cdef timespec ts
cdef double current
IF UNAME_SYSNAME == "Darwin":
# Darwin doesn't have a CLOCK_BOOTTIME
CLOCK_BOOTTIME = CLOCK_MONOTONIC_RAW
ELSE:
from posix.time cimport CLOCK_BOOTTIME
clock_gettime(clock_id, &ts)
current = ts.tv_sec + (ts.tv_nsec / 1000000000.)
return current
cdef double readclock(clockid_t clock_id):
cdef timespec ts
cdef double current
clock_gettime(clock_id, &ts)
current = ts.tv_sec + (ts.tv_nsec / 1000000000.)
return current
def monotonic_time():
return readclock(CLOCK_MONOTONIC_RAW)
return readclock(CLOCK_MONOTONIC_RAW)
def sec_since_boot():
return readclock(CLOCK_BOOTTIME)
return readclock(CLOCK_BOOTTIME)
+6
View File
@@ -2,8 +2,14 @@ import os
import sys
import fcntl
import hashlib
import platform
from cffi import FFI
def suffix():
if platform.system() == "Darwin":
return ".dylib"
else:
return ".so"
def ffi_wrap(name, c_code, c_header, tmpdir="/tmp/ccache", cflags="", libraries=None):
if libraries is None:
+38
View File
@@ -1,9 +1,11 @@
import io
import os
import sys
import copy
import json
import socket
import logging
import traceback
from threading import local
from collections import OrderedDict
from contextlib import contextmanager
@@ -118,6 +120,42 @@ class SwagLogger(logging.Logger):
else:
self.info(evt)
def findCaller(self, stack_info=False, stacklevel=1):
"""
Find the stack frame of the caller so that we can note the source
file name, line number and function name.
"""
f = sys._getframe(3)
#On some versions of IronPython, currentframe() returns None if
#IronPython isn't run with -X:Frames.
if f is not None:
f = f.f_back
orig_f = f
while f and stacklevel > 1:
f = f.f_back
stacklevel -= 1
if not f:
f = orig_f
rv = "(unknown file)", 0, "(unknown function)", None
while hasattr(f, "f_code"):
co = f.f_code
filename = os.path.normcase(co.co_filename)
if filename == _srcfile:
f = f.f_back
continue
sinfo = None
if stack_info:
sio = io.StringIO()
sio.write('Stack (most recent call last):\n')
traceback.print_stack(f, file=sio)
sinfo = sio.getvalue()
if sinfo[-1] == '\n':
sinfo = sinfo[:-1]
sio.close()
rv = (co.co_filename, f.f_lineno, co.co_name, sinfo)
break
return rv
if __name__ == "__main__":
log = SwagLogger()
+11 -5
View File
@@ -29,7 +29,7 @@ import fcntl
import tempfile
import threading
from enum import Enum
from common.basedir import PARAMS
def mkdirs_exists_ok(path):
try:
@@ -54,6 +54,7 @@ keys = {
"AthenadPid": [TxType.PERSISTENT],
"CalibrationParams": [TxType.PERSISTENT],
"CarParams": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"CarParamsCache": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"CarVin": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"CommunityFeaturesToggle": [TxType.PERSISTENT],
"CompletedTrainingVersion": [TxType.PERSISTENT],
@@ -112,6 +113,8 @@ keys = {
"DragonCachedModel": [TxType.PERSISTENT],
"DragonCachedFP": [TxType.PERSISTENT],
"DragonCachedVIN": [TxType.PERSISTENT],
"DragonCachedCarFW": [TxType.PERSISTENT],
"DragonCachedSource": [TxType.PERSISTENT],
"DragonAllowGas": [TxType.PERSISTENT],
"DragonToyotaStockDSU": [TxType.PERSISTENT],
"DragonLatCtrl": [TxType.PERSISTENT],
@@ -148,12 +151,10 @@ keys = {
"DragonUIBlinker": [TxType.PERSISTENT],
"DragonEnableDriverMonitoring": [TxType.PERSISTENT],
"DragonCarModel": [TxType.PERSISTENT],
"DragonCarVIN": [TxType.PERSISTENT],
"DragonCarVIN": [TxType.PERSISTENT], #deprecated
"DragonEnableSlowOnCurve": [TxType.PERSISTENT],
"DragonEnableLeadCarMovingAlert": [TxType.PERSISTENT],
"DragonToyotaSnGMod": [TxType.PERSISTENT],
"DragonIsEON": [TxType.PERSISTENT], # deprecated
"DragonHWChecked": [TxType.PERSISTENT], # deprecated
"DragonEnableSRLearner": [TxType.PERSISTENT],
"DragonWazeMode": [TxType.PERSISTENT],
"DragonRunWaze": [TxType.PERSISTENT],
@@ -383,7 +384,7 @@ def write_db(params_path, key, value):
lock.release()
class Params():
def __init__(self, db='/data/params'):
def __init__(self, db=PARAMS):
self.db = db
# create the database if it doesn't exist...
@@ -391,6 +392,11 @@ class Params():
with self.transaction(write=True):
pass
def clear_all(self):
shutil.rmtree(self.db, ignore_errors=True)
with self.transaction(write=True):
pass
def transaction(self, write=False):
if write:
return DBWriter(self.db)
-31
View File
@@ -131,37 +131,6 @@ def img_from_device(pt_device):
return pt_img.reshape(input_shape)[:,:2]
#TODO please use generic img transform below
def rotate_img(img, eulers, crop=None, intrinsics=eon_intrinsics):
import cv2 # pylint: disable=import-error
size = img.shape[:2]
rot = orient.rot_from_euler(eulers)
quadrangle = np.array([[0, 0],
[size[1]-1, 0],
[0, size[0]-1],
[size[1]-1, size[0]-1]], dtype=np.float32)
quadrangle_norm = np.hstack((normalize(quadrangle, intrinsics=intrinsics), np.ones((4,1))))
warped_quadrangle_full = np.einsum('ij, kj->ki', intrinsics.dot(rot), quadrangle_norm)
warped_quadrangle = np.column_stack((warped_quadrangle_full[:,0]/warped_quadrangle_full[:,2],
warped_quadrangle_full[:,1]/warped_quadrangle_full[:,2])).astype(np.float32)
if crop:
W_border = (size[1] - crop[0])//2
H_border = (size[0] - crop[1])//2
outside_crop = (((warped_quadrangle[:,0] < W_border) |
(warped_quadrangle[:,0] >= size[1] - W_border)) &
((warped_quadrangle[:,1] < H_border) |
(warped_quadrangle[:,1] >= size[0] - H_border)))
if not outside_crop.all():
raise ValueError("warped image not contained inside crop")
else:
H_border, W_border = 0, 0
M = cv2.getPerspectiveTransform(quadrangle, warped_quadrangle)
img_warped = cv2.warpPerspective(img, M, size[::-1])
return img_warped[H_border: size[0] - H_border,
W_border: size[1] - W_border]
def get_camera_frame_from_calib_frame(camera_frame_from_road_frame):
camera_frame_from_ground = camera_frame_from_road_frame[:, (0, 1, 3)]
calib_frame_from_ground = np.dot(eon_intrinsics,
+1 -1
View File
@@ -31,7 +31,7 @@
# Android system locale, zh-TW = Traditional Chinese, zh-CN = Simplified Chinese
lang=zh-CN
lang=en
update_font=0
remove_old_font=0
+2 -2
View File
@@ -1,7 +1,7 @@
{
"ota_url": "https://commadist.azureedge.net/neosupdate/ota-signed-efdf7de63b1aef63d68301e6175930991bf9a5927d16ec6fcc69287e2ee7ca4a.zip",
"ota_url": "http://dpp.cool/neosupdate/ota-signed-efdf7de63b1aef63d68301e6175930991bf9a5927d16ec6fcc69287e2ee7ca4a.zip",
"ota_hash": "efdf7de63b1aef63d68301e6175930991bf9a5927d16ec6fcc69287e2ee7ca4a",
"recovery_url": "https://commadist.azureedge.net/neosupdate/recovery-97c27e6ed04ed6bb0608b845a2d4100912093f9380c3f2ba6b56bccd608e5f6e.img",
"recovery_url": "http://dpp.cool/neosupdate/recovery-97c27e6ed04ed6bb0608b845a2d4100912093f9380c3f2ba6b56bccd608e5f6e.img",
"recovery_len": 15861036,
"recovery_hash": "97c27e6ed04ed6bb0608b845a2d4100912093f9380c3f2ba6b56bccd608e5f6e"
}
+2 -4
View File
@@ -155,8 +155,6 @@ struct Updater {
TouchState touch;
int fb_w, fb_h;
EGLDisplay display;
EGLSurface surface;
FramebufferState *fb = NULL;
NVGcontext *vg = NULL;
@@ -198,7 +196,7 @@ struct Updater {
touch_init(&touch);
fb = framebuffer_init("updater", 0x00001000, false,
&display, &surface, &fb_w, &fb_h);
&fb_w, &fb_h);
assert(fb);
vg = nvgCreateGLES3(NVG_ANTIALIAS | NVG_STENCIL_STROKES | NVG_DEBUG);
@@ -708,7 +706,7 @@ struct Updater {
glDisable(GL_BLEND);
eglSwapBuffers(display, surface);
framebuffer_swap(fb);
assert(glGetError() == GL_NO_ERROR);
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2
View File
@@ -3,6 +3,8 @@
*.tmp
*.dylib
.*.swp
.DS_Store
can/*.so
can/build/
can/obj/
+3
View File
@@ -16,6 +16,9 @@ Wondering what's the DBC file format? [Here](http://www.socialledge.com/sjsu/ind
Use [panda](https://github.com/commaai/panda) to connect your car to a computer.
### How to use reverse engineered DBC
To create custom CAN simulations or send reverse engineered signals back to the car you can use [CANdevStudio](https://github.com/GENIVI/CANdevStudio) project.
### DBC file preprocessor
DBC files for different models of the same brand have a lot of overlap. Therefore, we wrote a preprocessor to create DBC files from a brand DBC file and a model specific DBC file. The source DBC files can be found in the generator folder. After changing one of the files run the generator.py script to regenerate the output files. These output files will be placed in the root of the opendbc repository and are suffixed by _generated.
@@ -0,0 +1,65 @@
CM_ "IMPORT _honda_2017.dbc"
CM_ "IMPORT _comma.dbc"
BO_ 342 STEERING_SENSORS: 6 EPS
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
SG_ STEER_ANGLE_RATE : 23|16@0- (1,0) [-3000|3000] "deg/s" EON
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 43|4@0+ (1,0) [0|15] "" EON
BO_ 399 STEER_STATUS: 6 EPS
SG_ STEER_TORQUE_SENSOR : 7|12@0- (-1,0) [-2047.5|2047.5] "tbd" EON
SG_ STEER_TORQUE_MOTOR : 23|16@0- (-1,0) [-31000|31000] "tbd" EON
SG_ STEER_CONTROL_ACTIVE : 36|1@0+ (1,0) [0|1] "" EON
SG_ STEER_STATUS : 35|4@0+ (1,0) [0|15] "" EON
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 43|4@0+ (1,0) [0|15] "" EON
BO_ 419 GEARBOX: 8 PCM
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
SG_ GEAR_SHIFTER : 29|6@0+ (1,0) [0|63] "" EON
SG_ GEAR : 7|8@0+ (1,0) [0|255] "" EON
BO_ 404 STEERING_CONTROL: 4 EON
SG_ STEER_TORQUE : 7|12@0- (1,0) [-768|768] "" EPS
SG_ SET_ME_X00 : 11|4@0+ (1,0) [0|15] "" EPS
SG_ STEER_TORQUE_REQUEST : 23|1@0+ (1,0) [0|1] "" EPS
SG_ SET_ME_X00 : 22|7@0+ (1,0) [0|127] "" EPS
SG_ COUNTER : 29|2@0+ (1,0) [0|15] "" EPS
SG_ CHECKSUM : 27|4@0+ (1,0) [0|3] "" EPS
BO_ 422 SCM_BUTTONS: 8 SCM
SG_ CRUISE_BUTTONS : 7|3@0+ (1,0) [0|7] "" EON
SG_ LIGHTS_SETTING : 1|2@0+ (1,0) [0|3] "" EON
SG_ MAIN_ON : 47|1@0+ (1,0) [0|1] "" EON
SG_ CRUISE_SETTING : 43|2@0+ (1,0) [0|3] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
BO_ 487 BRAKE_PRESSURE: 4 VSA
SG_ BRAKE_PRESSURE1 : 7|10@0+ (0.015625,-103) [0|1000] "" EON
SG_ BRAKE_PRESSURE2 : 9|10@0+ (0.015625,-103) [0|1000] "" EON
SG_ COUNTER : 29|2@0+ (1,0) [0|15] "" EON
SG_ CHECKSUM : 27|4@0+ (1,0) [0|3] "" EON
BO_ 660 SCM_FEEDBACK: 8 SCM
SG_ RIGHT_BLINKER : 6|1@0+ (1,0) [0|1] "" EON
SG_ LEFT_BLINKER : 5|1@0+ (1,0) [0|1] "" EON
SG_ WIPERS_SPEED : 4|2@0+ (1,0) [0|3] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
BO_ 891 WIPERS: 8 XXX
SG_ WIPERS : 17|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal" ;
VAL_ 419 GEAR_SHIFTER 32 "D" 8 "R" 4 "P" ;
VAL_ 422 CRUISE_BUTTONS 7 "tbd" 6 "tbd" 5 "tbd" 4 "accel_res" 3 "decel_set" 2 "cancel" 1 "main" 0 "none" ;
VAL_ 422 LIGHTS_SETTING 3 "high_beam" 2 "low_beam" 1 "position" 0 "no_lights" ;
VAL_ 422 CRUISE_SETTING 3 "distance_adj" 2 "tbd" 1 "lkas_button" 0 "none" ;
VAL_ 891 WIPERS 4 "High" 2 "Low" 0 "Off" ;
CM_ "CHFFR_METRIC 342 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
@@ -0,0 +1,37 @@
CM_ "IMPORT _toyota_2017.dbc"
CM_ "IMPORT _comma.dbc"
BO_ 550 BRAKE_MODULE: 8 XXX
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|1] "" XXX
BO_ 581 GAS_PEDAL: 5 XXX
SG_ GAS_PEDAL : 23|8@0+ (0.005,0) [0|1] "" XXX
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
SG_ STEER_TORQUE_EPS : 47|16@0- (0.73,0) [-20000|20000] "" XXX
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 610 EPS_STATUS: 5 EPS
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
SG_ LKA_STATE : 31|7@0+ (1,0) [0|127] "" XXX
SG_ TYPE : 24|1@0+ (1,0) [0|1] "" XXX
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
BO_ 956 GEAR_PACKET: 8 XXX
SG_ SPORT_ON : 2|1@0+ (1,0) [0|1] "" XXX
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" XXX
SG_ ECON_ON : 40|1@0+ (1,0) [0|1] "" XXX
CM_ SG_ 550 BRAKE_PRESSURE "seems prop to pedal force";
CM_ SG_ 550 BRAKE_POSITION "seems proportional to pedal displacement, unclear the max value of 0x1c8";
CM_ SG_ 581 GAS_PEDAL "it seems slightly filtered";
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled";
VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby";
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P";
VAL_ 956 SPORT_ON 0 "off" 1 "on";
VAL_ 956 ECON_ON 0 "off" 1 "on";
@@ -0,0 +1,176 @@
VERSION ""
NS_ :
NS_DESC_
CM_
BA_DEF_
BA_
VAL_
CAT_DEF_
CAT_
FILTER
BA_DEF_DEF_
EV_DATA_
ENVVAR_DATA_
SGTYPE_
SGTYPE_VAL_
BA_DEF_SGTYPE_
BA_SGTYPE_
SIG_TYPE_REF_
VAL_TABLE_
SIG_GROUP_
SIG_VALTYPE_
SIGTYPE_VALTYPE_
BO_TX_BU_
BA_DEF_REL_
BA_REL_
BA_DEF_DEF_REL_
BU_SG_REL_
BU_EV_REL_
BU_BO_REL_
SG_MUL_VAL_
BS_:
BU_: K16_BECM K114B_HPCM T18_BatteryCharger
BO_ 512 Battery_Module_1: 8 K16_BECM
SG_ Voltage_1_0_A m0 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_0_B m0 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_0_C m0 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_1_A m1 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_1_B m1 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_1_C m1 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_2_A m2 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_2_B m2 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_2_C m2 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_3_A m3 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_3_B m3 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_3_C m3 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_4_A m4 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_4_B m4 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_4_C m4 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_5_A m5 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_5_B m5 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_5_C m5 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_6_A m6 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_6_B m6 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_6_C m6 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_7_A m7 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_7_B m7 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_1_7_C m7 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Cell_Bank_Number_1 M : 53|7@1+ (1,0) [0|0] "" K16_BECM
BO_ 514 Battery_Module_2: 8 K16_BECM
SG_ Voltage_2_0_A m0 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_0_B m0 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_0_C m0 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_1_A m1 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_1_B m1 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_1_C m1 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_2_A m2 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_2_B m2 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_2_C m2 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_3_A m3 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_3_B m3 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_3_C m3 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_4_A m4 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_4_B m4 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_4_C m4 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_5_A m5 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_5_B m5 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_5_C m5 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_6_A m6 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_6_B m6 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_6_C m6 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_7_A m7 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_7_B m7 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_2_7_C m7 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Cell_Bank_Number_2 M : 53|7@1+ (1,0) [0|0] "" K16_BECM
BO_ 516 Battery_Module_3: 8 K16_BECM
SG_ Voltage_3_0_A m0 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_0_B m0 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_0_C m0 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_1_A m1 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_1_B m1 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_1_C m1 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_2_A m2 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_2_B m2 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_2_C m2 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_3_A m3 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_3_B m3 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_3_C m3 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_4_A m4 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_4_B m4 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_4_C m4 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_5_A m5 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_5_B m5 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_5_C m5 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_6_A m6 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_6_B m6 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_6_C m6 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_7_A m7 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_7_B m7 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_3_7_C m7 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Cell_Bank_Number_3 M : 53|7@1+ (1,0) [0|0] "" K16_BECM
BO_ 518 Battery_Module_4: 8 K16_BECM
SG_ Voltage_4_0_A m0 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_0_B m0 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_0_C m0 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_1_A m1 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_1_B m1 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_1_C m1 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_2_A m2 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_2_B m2 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_2_C m2 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_3_A m3 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_3_B m3 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_3_C m3 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_4_A m4 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_4_B m4 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_4_C m4 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_5_A m5 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_5_B m5 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_5_C m5 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_6_A m6 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_6_B m6 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_6_C m6 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_7_A m7 : 4|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_7_B m7 : 20|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Voltage_4_7_C m7 : 36|12@1+ (0.00125,0) [0|0] "V" K16_BECM
SG_ Cell_Bank_Number_4 M : 53|7@1+ (1,0) [0|0] "" K16_BECM
BO_ 528 Pack_Stats: 8 K16_BECM
SG_ Pack_Voltage : 7|12@0+ (0.125,0) [0|0] "V" K16_BECM
SG_ Pack_Amps : 9|10@0+ (0.1,0) [0|0] "" K16_BECM
SG_ Pack_Amps2 : 28|12@0+ (0.05,0) [0|0] "" K16_BECM
BO_ 530 Charger_stats: 6 T18_BatteryCharger
SG_ Charger_HV_Current : 0|13@1+ (0.05,0) [0|0] "A" K16_BECM
SG_ HV_Voltage : 13|10@1+ (0.5,0) [0|0] "V" K16_BECM
SG_ LV_Current : 23|8@1+ (0.2,0) [0|0] "A" K16_BECM
SG_ LV_Voltage : 31|10@1- (0.025,0) [0|0] "V" K16_BECM
BO_ 770 Battery_temp: 8 K16_BECM
SG_ Temp_A m0 : 8|8@1+ (0.5,-40) [0|0] "C" K16_BECM
SG_ Temp_B m0 : 16|8@1+ (0.5,-40) [0|0] "C" K16_BECM
SG_ Temp_C m0 : 24|8@1+ (0.5,-40) [0|0] "C" K16_BECM
SG_ Temp_D m0 : 32|8@1+ (0.5,-40) [0|0] "C" K16_BECM
SG_ Temp_E m0 : 40|8@1+ (0.5,-40) [0|0] "C" K16_BECM
SG_ Temp_F m0 : 48|8@1+ (0.5,-40) [0|0] "C" K16_BECM
SG_ Temp_G m1 : 8|8@1+ (0.5,-40) [0|0] "C" K16_BECM
SG_ Temp_H m1 : 16|8@1+ (0.5,-40) [0|0] "C" K16_BECM
SG_ Temp_I m1 : 24|8@1+ (0.5,-40) [0|0] "C" K16_BECM
SG_ Switch M : 2|1@1+ (1,0) [0|0] "" K16_BECM
BA_DEF_ BO_ "GenMsgBackgroundColor" STRING ;
BA_DEF_ BO_ "GenMsgForegroundColor" STRING ;
BA_DEF_ BO_ "isj1939dbc" INT 0 0;
BA_DEF_DEF_ "GenMsgBackgroundColor" "#ffffff";
BA_DEF_DEF_ "GenMsgForegroundColor" "#000000";
BA_DEF_DEF_ "isj1939dbc" 0;
CM_ BU_ K16_BECM "Battery Energy Control Module";
CM_ BU_ K114B_HPCM "Hybrid Powertrain Control Module";
CM_ BU_ T18_BatteryCharger "Battery Charger";
@@ -0,0 +1,319 @@
CM_ "AUTOGENERATED FILE, DO NOT EDIT"
CM_ "Imported file _comma.dbc starts here"
BO_ 512 GAS_COMMAND: 6 EON
SG_ GAS_COMMAND : 7|16@0+ (0.253984064,-83.3) [0|1] "" INTERCEPTOR
SG_ GAS_COMMAND2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" INTERCEPTOR
SG_ ENABLE : 39|1@0+ (1,0) [0|1] "" INTERCEPTOR
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" INTERCEPTOR
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" INTERCEPTOR
BO_ 513 GAS_SENSOR: 6 INTERCEPTOR
SG_ INTERCEPTOR_GAS : 7|16@0+ (0.253984064,-83.3) [0|1] "" EON
SG_ INTERCEPTOR_GAS2 : 23|16@0+ (0.126992032,-83.3) [0|1] "" EON
SG_ STATE : 39|4@0+ (1,0) [0|15] "" EON
SG_ COUNTER_PEDAL : 35|4@0+ (1,0) [0|15] "" EON
SG_ CHECKSUM_PEDAL : 47|8@0+ (1,0) [0|255] "" EON
VAL_ 513 STATE 5 "FAULT_TIMEOUT" 4 "FAULT_STARTUP" 3 "FAULT_SCE" 2 "FAULT_SEND" 1 "FAULT_BAD_CHECKSUM" 0 "NO_FAULT" ;
CM_ "Imported file _honda_2017.dbc starts here"
VERSION ""
NS_ :
NS_DESC_
CM_
BA_DEF_
BA_
VAL_
CAT_DEF_
CAT_
FILTER
BA_DEF_DEF_
EV_DATA_
ENVVAR_DATA_
SGTYPE_
SGTYPE_VAL_
BA_DEF_SGTYPE_
BA_SGTYPE_
SIG_TYPE_REF_
VAL_TABLE_
SIG_GROUP_
SIG_VALTYPE_
SIGTYPE_VALTYPE_
BO_TX_BU_
BA_DEF_REL_
BA_REL_
BA_DEF_DEF_REL_
BU_SG_REL_
BU_EV_REL_
BU_BO_REL_
SG_MUL_VAL_
BU_: EBCM ADAS PCM EPS VSA SCM BDY XXX EPB EON
BO_ 344 ENGINE_DATA: 8 PCM
SG_ XMISSION_SPEED : 7|16@0+ (0.01,0) [0|250] "kph" EON
SG_ ENGINE_RPM : 23|16@0+ (1,0) [0|15000] "rpm" EON
SG_ XMISSION_SPEED2 : 39|16@0+ (0.01,0) [0|250] "kph" EON
SG_ ODOMETER : 55|8@0+ (10,0) [0|2550] "m" XXX
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
BO_ 380 POWERTRAIN_DATA: 8 PCM
SG_ PEDAL_GAS : 7|8@0+ (1,0) [0|255] "" EON
SG_ ENGINE_RPM : 23|16@0+ (1,0) [0|15000] "rpm" EON
SG_ GAS_PRESSED : 39|1@0+ (1,0) [0|1] "" EON
SG_ ACC_STATUS : 38|1@0+ (1,0) [0|1] "rpm" EON
SG_ BOH_17C : 37|5@0+ (1,0) [0|1] "rpm" EON
SG_ BRAKE_SWITCH : 32|1@0+ (1,0) [0|1] "rpm" EON
SG_ BOH2_17C : 47|10@0+ (1,0) [0|1] "rpm" EON
SG_ BRAKE_PRESSED : 53|1@0+ (1,0) [0|1] "" EON
SG_ BOH3_17C : 52|5@0+ (1,0) [0|1] "rpm" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
BO_ 420 VSA_STATUS: 8 VSA
SG_ USER_BRAKE : 7|16@0+ (0.015625,-1.609375) [0|1000] "" EON
SG_ COMPUTER_BRAKING : 23|1@0+ (1,0) [0|1] "" EON
SG_ ESP_DISABLED : 28|1@0+ (1,0) [0|1] "" EON
SG_ BRAKE_HOLD_RELATED : 52|1@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_HOLD_ACTIVE : 46|1@0+ (1,0) [0|1] "" EON
SG_ BRAKE_HOLD_ENABLED : 45|1@0+ (1,0) [0|1] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
BO_ 427 STEER_MOTOR_TORQUE: 3 EPS
SG_ CONFIG_VALID : 7|1@0+ (1,0) [0|1] "" EON
SG_ MOTOR_TORQUE : 1|10@0+ (1,0) [0|256] "" EON
SG_ OUTPUT_DISABLED : 22|1@0+ (1,0) [0|1] "" EON
SG_ COUNTER : 21|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 19|4@0+ (1,0) [0|15] "" EON
BO_ 432 STANDSTILL: 7 VSA
SG_ CONTROLLED_STANDSTILL : 0|1@0+ (1,0) [0|1] "" EON
SG_ WHEELS_MOVING : 12|1@0+ (1,0) [0|1] "" EON
SG_ BRAKE_ERROR_1 : 11|1@0+ (1,0) [0|1] "" EON
SG_ BRAKE_ERROR_2 : 9|1@0+ (1,0) [0|1] "" EON
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 51|4@0+ (1,0) [0|3] "" EON
BO_ 464 WHEEL_SPEEDS: 8 VSA
SG_ WHEEL_SPEED_FL : 7|15@0+ (0.01,0) [0|250] "kph" EON
SG_ WHEEL_SPEED_FR : 8|15@0+ (0.01,0) [0|250] "kph" EON
SG_ WHEEL_SPEED_RL : 25|15@0+ (0.01,0) [0|250] "kph" EON
SG_ WHEEL_SPEED_RR : 42|15@0+ (0.01,0) [0|250] "kph" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
BO_ 490 VEHICLE_DYNAMICS: 8 VSA
SG_ LONG_ACCEL : 23|16@0- (0.0015384,0) [-20|20] "m/s2" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
BO_ 506 BRAKE_COMMAND: 8 ADAS
SG_ COMPUTER_BRAKE : 7|10@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_X00 : 13|5@0+ (1,0) [0|1] "" EBCM
SG_ BRAKE_PUMP_REQUEST : 8|1@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_X00_2 : 23|3@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_OVERRIDE : 20|1@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_X00_3 : 19|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_FAULT_CMD : 18|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_CANCEL_CMD : 17|1@0+ (1,0) [0|1] "" EBCM
SG_ COMPUTER_BRAKE_REQUEST : 16|1@0+ (1,0) [0|1] "" EBCM
SG_ SET_ME_1 : 31|1@0+ (1,0) [0|1] "" EBCM
SG_ AEB_REQ_1 : 29|1@0+ (1,0) [0|1] "" XXX
SG_ AEB_REQ_2 : 26|3@0+ (1,0) [0|7] "" XXX
SG_ BRAKE_LIGHTS : 39|1@0+ (1,0) [0|1] "" EBCM
SG_ CRUISE_STATES : 38|7@0+ (1,0) [0|1] "" EBCM
SG_ CHIME : 47|3@0+ (1,0) [0|7] "" EBCM
SG_ SET_ME_X00_4 : 44|1@0+ (1,0) [0|1] "" EBCM
SG_ FCW : 43|2@0+ (1,0) [0|3] "" EBCM
SG_ AEB_STATUS : 41|2@0+ (1,0) [0|3] "" XXX
SG_ SET_ME_X00_5 : 55|8@0+ (1,0) [0|0] "" EBCM
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EBCM
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EBCM
BO_ 597 ROUGH_WHEEL_SPEED: 8 VSA
SG_ WHEEL_SPEED_FL : 7|8@0+ (1,0) [0|255] "mph" EON
SG_ WHEEL_SPEED_FR : 15|8@0+ (1,0) [0|255] "mph" EON
SG_ WHEEL_SPEED_RL : 23|8@0+ (1,0) [0|255] "mph" EON
SG_ WHEEL_SPEED_RR : 31|8@0+ (1,0) [0|255] "mph" EON
SG_ SET_TO_X55 : 39|8@0+ (1,0) [0|255] "" EON
SG_ SET_TO_X55_2 : 47|8@0+ (1,0) [0|255] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
BO_ 773 SEATBELT_STATUS: 7 BDY
SG_ SEATBELT_DRIVER_LAMP : 7|1@0+ (1,0) [0|1] "" EON
SG_ SEATBELT_PASS_UNLATCHED : 10|1@0+ (1,0) [0|1] "" EON
SG_ SEATBELT_PASS_LATCHED : 11|1@0+ (1,0) [0|1] "" EON
SG_ SEATBELT_DRIVER_UNLATCHED : 12|1@0+ (1,0) [0|1] "" EON
SG_ SEATBELT_DRIVER_LATCHED : 13|1@0+ (1,0) [0|1] "" EON
SG_ PASS_AIRBAG_OFF : 14|1@0+ (1,0) [0|1] "" EON
SG_ PASS_AIRBAG_ON : 15|1@0+ (1,0) [0|1] "" EON
SG_ COUNTER : 53|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 51|4@0+ (1,0) [0|3] "" EON
BO_ 777 LOCK_STATUS: 8 XXX
SG_ DOORS_UNLOCKED : 54|1@0+ (1,0) [0|1] "" EON
SG_ DOORS_LOCKED : 55|1@0+ (1,0) [0|1] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
BO_ 780 ACC_HUD: 8 ADAS
SG_ PCM_SPEED : 7|16@0+ (0.01,0) [0|250] "kph" BDY
SG_ PCM_GAS : 23|8@0+ (1,0) [0|127] "" BDY
SG_ CRUISE_SPEED : 31|8@0+ (1,0) [0|255] "" BDY
SG_ DTC_MODE : 39|1@0+ (1,0) [0|1] "" BDY
SG_ BOH : 38|1@0+ (1,0) [0|1] "" BDY
SG_ ACC_PROBLEM : 37|1@0+ (1,0) [0|1] "" BDY
SG_ FCM_OFF : 36|1@0+ (1,0) [0|1] "" BDY
SG_ FCM_OFF_2 : 35|1@0+ (1,0) [0|1] "" BDY
SG_ FCM_PROBLEM : 34|1@0+ (1,0) [0|1] "" BDY
SG_ RADAR_OBSTRUCTED : 33|1@0+ (1,0) [0|1] "" BDY
SG_ ENABLE_MINI_CAR : 32|1@0+ (1,0) [0|1] "" BDY
SG_ HUD_DISTANCE : 47|2@0+ (1,0) [0|3] "" BDY
SG_ HUD_LEAD : 45|2@0+ (1,0) [0|3] "" BDY
SG_ BOH_3 : 43|1@0+ (1,0) [0|3] "" BDY
SG_ BOH_4 : 42|1@0+ (1,0) [0|3] "" BDY
SG_ BOH_5 : 41|1@0+ (1,0) [0|3] "" BDY
SG_ CRUISE_CONTROL_LABEL : 40|1@0+ (1,0) [0|3] "" BDY
SG_ SET_ME_X01_2 : 55|1@0+ (1,0) [0|1] "" BDY
SG_ IMPERIAL_UNIT : 54|1@0+ (1,0) [0|1] "" BDY
SG_ HUD_DISTANCE_3 : 52|1@0+ (1,0) [0|1] "" BDY
SG_ CHIME : 51|3@0+ (1,0) [0|1] "" BDY
SG_ SET_ME_X01 : 48|1@0+ (1,0) [0|1] "" BDY
SG_ ICONS : 63|2@0+ (1,0) [0|1] "" BDY
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" BDY
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" BDY
BO_ 804 CRUISE: 8 PCM
SG_ HUD_SPEED_KPH : 7|8@0+ (1,0) [0|255] "kph" EON
SG_ HUD_SPEED_MPH : 15|8@0+ (1,0) [0|255] "mph" EON
SG_ TRIP_FUEL_CONSUMED : 23|16@0+ (1,0) [0|255] "" EON
SG_ CRUISE_SPEED_PCM : 39|8@0+ (1,0) [0|255] "" EON
SG_ BOH2 : 47|8@0- (1,0) [0|255] "" EON
SG_ BOH3 : 55|8@0+ (1,0) [0|255] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
BO_ 829 LKAS_HUD: 5 ADAS
SG_ CAM_TEMP_HIGH : 7|1@0+ (1,0) [0|255] "" BDY
SG_ SET_ME_X41 : 6|7@0+ (1,0) [0|127] "" BDY
SG_ BOH : 6|7@0+ (1,0) [0|127] "" BDY
SG_ DASHED_LANES : 14|1@0+ (1,0) [0|1] "" BDY
SG_ DTC : 13|1@0+ (1,0) [0|1] "" BDY
SG_ LKAS_PROBLEM : 12|1@0+ (1,0) [0|1] "" BDY
SG_ LKAS_OFF : 11|1@0+ (1,0) [0|1] "" BDY
SG_ SOLID_LANES : 10|1@0+ (1,0) [0|1] "" BDY
SG_ LDW_RIGHT : 9|1@0+ (1,0) [0|1] "" BDY
SG_ STEERING_REQUIRED : 8|1@0+ (1,0) [0|1] "" BDY
SG_ BOH : 23|2@0+ (1,0) [0|4] "" BDY
SG_ LDW_PROBLEM : 21|1@0+ (1,0) [0|1] "" BDY
SG_ BEEP : 17|2@0+ (1,0) [0|1] "" BDY
SG_ LDW_ON : 28|1@0+ (1,0) [0|1] "" BDY
SG_ LDW_OFF : 27|1@0+ (1,0) [0|1] "" BDY
SG_ CLEAN_WINDSHIELD : 26|1@0+ (1,0) [0|1] "" BDY
SG_ SET_ME_X48 : 31|8@0+ (1,0) [0|255] "" BDY
SG_ COUNTER : 37|2@0+ (1,0) [0|3] "" BDY
SG_ CHECKSUM : 35|4@0+ (1,0) [0|15] "" BDY
BO_ 892 CRUISE_PARAMS: 8 PCM
SG_ CRUISE_SPEED_OFFSET : 31|8@0- (0.1,0) [-128|127] "kph" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
BO_ 1029 DOORS_STATUS: 8 BDY
SG_ DOOR_OPEN_FL : 37|1@0+ (1,0) [0|1] "" EON
SG_ DOOR_OPEN_FR : 38|1@0+ (1,0) [0|1] "" EON
SG_ DOOR_OPEN_RL : 39|1@0+ (1,0) [0|1] "" EON
SG_ DOOR_OPEN_RR : 40|1@0+ (1,0) [0|1] "" EON
SG_ TRUNK_OPEN : 41|1@0+ (1,0) [0|1] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
CM_ SG_ 490 LONG_ACCEL "wheel speed derivative, noisy and zero snapping";
CM_ SG_ 506 AEB_REQ_1 "set for duration of suspected AEB event";
CM_ SG_ 773 PASS_AIRBAG_ON "Might just be indicator light";
CM_ SG_ 773 PASS_AIRBAG_OFF "Might just be indicator light";
CM_ SG_ 780 CRUISE_SPEED "255 = no speed";
CM_ SG_ 804 CRUISE_SPEED_PCM "255 = no speed";
CM_ SG_ 829 BEEP "beeps are pleasant, chimes are for warnngs etc...";
VAL_ 506 FCW 3 "fcw" 2 "fcw" 1 "fcw" 0 "no_fcw" ;
VAL_ 506 CHIME 4 "double_chime" 3 "single_chime" 2 "continuous_chime" 1 "repeating_chime" 0 "no_chime" ;
VAL_ 506 AEB_STATUS 3 "aeb_prepare" 2 "aeb_ready" 1 "aeb_braking" 0 "no_aeb" ;
VAL_ 780 CRUISE_SPEED 255 "no_speed" 252 "stopped" ;
VAL_ 780 HUD_LEAD 3 "acc_off" 2 "solid_car" 1 "dashed_car" 0 "no_car" ;
VAL_ 829 BEEP 3 "single_beep" 2 "triple_beep" 1 "repeated_beep" 0 "no_beep" ;
CM_ "honda_crv_executive_2016_can.dbc starts here"
BO_ 342 STEERING_SENSORS: 6 EPS
SG_ STEER_ANGLE : 7|16@0- (-0.1,0) [-500|500] "deg" EON
SG_ STEER_ANGLE_RATE : 23|16@0- (1,0) [-3000|3000] "deg/s" EON
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 43|4@0+ (1,0) [0|15] "" EON
BO_ 399 STEER_STATUS: 6 EPS
SG_ STEER_TORQUE_SENSOR : 7|12@0- (-1,0) [-2047.5|2047.5] "tbd" EON
SG_ STEER_TORQUE_MOTOR : 23|16@0- (-1,0) [-31000|31000] "tbd" EON
SG_ STEER_CONTROL_ACTIVE : 36|1@0+ (1,0) [0|1] "" EON
SG_ STEER_STATUS : 35|4@0+ (1,0) [0|15] "" EON
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 43|4@0+ (1,0) [0|15] "" EON
BO_ 419 GEARBOX: 8 PCM
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
SG_ GEAR_SHIFTER : 29|6@0+ (1,0) [0|63] "" EON
SG_ GEAR : 7|8@0+ (1,0) [0|255] "" EON
BO_ 404 STEERING_CONTROL: 4 EON
SG_ STEER_TORQUE : 7|12@0- (1,0) [-768|768] "" EPS
SG_ SET_ME_X00 : 11|4@0+ (1,0) [0|15] "" EPS
SG_ STEER_TORQUE_REQUEST : 23|1@0+ (1,0) [0|1] "" EPS
SG_ SET_ME_X00 : 22|7@0+ (1,0) [0|127] "" EPS
SG_ COUNTER : 29|2@0+ (1,0) [0|15] "" EPS
SG_ CHECKSUM : 27|4@0+ (1,0) [0|3] "" EPS
BO_ 422 SCM_BUTTONS: 8 SCM
SG_ CRUISE_BUTTONS : 7|3@0+ (1,0) [0|7] "" EON
SG_ LIGHTS_SETTING : 1|2@0+ (1,0) [0|3] "" EON
SG_ MAIN_ON : 47|1@0+ (1,0) [0|1] "" EON
SG_ CRUISE_SETTING : 43|2@0+ (1,0) [0|3] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
BO_ 487 BRAKE_PRESSURE: 4 VSA
SG_ BRAKE_PRESSURE1 : 7|10@0+ (0.015625,-103) [0|1000] "" EON
SG_ BRAKE_PRESSURE2 : 9|10@0+ (0.015625,-103) [0|1000] "" EON
SG_ COUNTER : 29|2@0+ (1,0) [0|15] "" EON
SG_ CHECKSUM : 27|4@0+ (1,0) [0|3] "" EON
BO_ 660 SCM_FEEDBACK: 8 SCM
SG_ RIGHT_BLINKER : 6|1@0+ (1,0) [0|1] "" EON
SG_ LEFT_BLINKER : 5|1@0+ (1,0) [0|1] "" EON
SG_ WIPERS_SPEED : 4|2@0+ (1,0) [0|3] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|15] "" EON
BO_ 891 WIPERS: 8 XXX
SG_ WIPERS : 17|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
VAL_ 399 STEER_STATUS 6 "tmp_fault" 5 "fault_1" 4 "no_torque_alert_2" 3 "low_speed_lockout" 2 "no_torque_alert_1" 0 "normal" ;
VAL_ 419 GEAR_SHIFTER 32 "D" 8 "R" 4 "P" ;
VAL_ 422 CRUISE_BUTTONS 7 "tbd" 6 "tbd" 5 "tbd" 4 "accel_res" 3 "decel_set" 2 "cancel" 1 "main" 0 "none" ;
VAL_ 422 LIGHTS_SETTING 3 "high_beam" 2 "low_beam" 1 "position" 0 "no_lights" ;
VAL_ 422 CRUISE_SETTING 3 "distance_adj" 2 "tbd" 1 "lkas_button" 0 "none" ;
VAL_ 891 WIPERS 4 "High" 2 "Low" 0 "Off" ;
CM_ "CHFFR_METRIC 342 STEER_ANGLE STEER_ANGLE 0.36 180; CHFFR_METRIC 380 ENGINE_RPM ENGINE_RPM 1 0; CHFFR_METRIC 804 ENGINE_TEMPERATURE ENGINE_TEMPERATURE 1 0";
+3 -1
View File
@@ -792,7 +792,7 @@ BO_ 1362 SNV11: 4 SNV
SG_ CF_Snv_IRLampControl : 10|2@1+ (1.0,0.0) [0.0|3.0] "" BCM,CLU,HUD
BO_ 593 MDPS12: 8 MDPS
SG_ CR_Mdps_StrColTq : 0|11@1+ (0.0078125,-8.0) [-8.0|7.9921875] "Nm" LDWS_LKAS
SG_ CR_Mdps_StrColTq : 0|11@1+ (1.0,-1024.0) [-1024.0|1024.0] "" LDWS_LKAS
SG_ CF_Mdps_Def : 11|1@1+ (1.0,0.0) [0.0|1.0] "" ESC
SG_ CF_Mdps_ToiUnavail : 12|1@1+ (1.0,0.0) [0.0|1.0] "" LDWS_LKAS
SG_ CF_Mdps_ToiActive : 13|1@1+ (1.0,0.0) [0.0|1.0] "" LDWS_LKAS
@@ -1444,3 +1444,5 @@ BO_ 905 SCC14: 8 SCC
SG_ JerkLowerLimit : 19|7@1+ (0.1,0) [0|12.7] "m/s^3" ESC
SG_ SCCMode : 32|3@1+ (1,0) [0|7] "" ESC
BO_ 882 ELECT_GEAR: 8 XXX
SG_ Elect_Gear_Shifter : 16|3@1+ (1,0) [0|7] "" CLU
@@ -70,8 +70,8 @@ BS_:
BU_: XXX DSU HCU EPS IPAS CGW
BO_ 36 KINEMATICS: 8 XXX
SG_ ACCEL_Y : 33|10@0+ (1,-512) [0|65535] "" XXX
SG_ YAW_RATE : 1|10@0+ (1,-512) [0|65535] "" XXX
SG_ ACCEL_Y : 33|10@0+ (0.03589,-18.375) [0|65535] "m/s^2" XXX
SG_ YAW_RATE : 1|10@0+ (0.244,-125) [0|65535] "deg/sec" XXX
SG_ STEERING_TORQUE : 17|10@0+ (1,-512) [0|65535] "" XXX
BO_ 37 STEER_ANGLE_SENSOR: 8 XXX
@@ -91,8 +91,8 @@ BO_ 170 WHEEL_SPEEDS: 8 XXX
BO_ 180 SPEED: 8 XXX
SG_ ENCODER : 39|8@0+ (1,0) [0|255] "" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
SG_ SPEED : 47|16@0+ (0.01,0) [0|250] "kph" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
BO_ 353 DSU_SPEED: 8 XXX
SG_ FORWARD_SPEED : 15|16@0- (0.00390625,-30) [0|255] "kph" XXX
@@ -184,6 +184,7 @@ BO_ 921 PCM_CRUISE_SM: 8 XXX
BO_ 951 ESP_CONTROL: 8 ESP
SG_ TC_DISABLED : 13|1@0+ (1,0) [0|1] "" XXX
SG_ VSC_DISABLED : 12|2@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_LIGHTS_ACC : 18|1@0+ (1,0) [0|1] "" XXX
BO_ 1041 ACC_HUD: 8 DSU
@@ -208,6 +209,17 @@ BO_ 1042 LKAS_HUD: 8 XXX
SG_ SET_ME_X38 : 55|8@0+ (1,0) [0|1] "" XXX
SG_ SET_ME_X02 : 63|8@0+ (1,0) [0|1] "" XXX
BO_ 1043 TIME : 8 CGW
SG_ YEAR : 7|8@0+ (1,0) [0|0] "year" XXX
SG_ MONTH : 15|8@0+ (1,0) [0|0] "month" XXX
SG_ DAY : 23|8@0+ (1,0) [0|0] "day" XXX
SG_ HOUR : 31|8@0+ (1,0) [0|0] "hour" XXX
SG_ MINUTE : 39|8@0+ (1,0) [0|0] "minute" XXX
SG_ GMT_DIFF : 55|1@0+ (1,0) [0|0] "" XXX
SG_ GMTDIFF_HOURS : 54|4@0+ (1,0) [0|0] "hours" XXX
SG_ GMTDIFF_MINUTES : 50|6@0+ (1,0) [0|0] "minutes" XXX
SG_ SUMMER : 60|1@0+ (1,0) [0|0] "" XXX
BO_ 1408 VIN_PART_1: 8 CGW
SG_ VIN_1 : 7|8@0+ (1,0) [0|0] "" XXX
SG_ VIN_2 : 15|8@0+ (1,0) [0|0] "" XXX
@@ -231,7 +243,7 @@ BO_ 1409 VIN_PART_2: 8 CGW
BO_ 1410 VIN_PART_3: 8 CGW
SG_ VIN_17 : 7|8@0+ (1,0) [0|0] "" XXX
BO_ 1553 UI_SEETING: 8 XXX
BO_ 1553 UI_SETTING: 8 XXX
SG_ UNITS : 26|2@0+ (1,0) [0|3] "" XXX
BO_ 1556 STEERING_LEVERS: 8 XXX
@@ -344,24 +356,23 @@ VAL_ 1162 SPLSGN3 15 "conditional blank" 4 "wet road" 5 "rain" 0 "none";
CM_ "CHFFR_METRIC 37 STEER_ANGLE STEER_ANGLE 0.36 180";
CM_ "lexus_is_hybrid_2017_pt.dbc starts here"
CM_ "lexus_nx300h_2018_pt.dbc starts here"
BO_ 581 GAS_PEDAL: 5 XXX
SG_ GAS_PEDAL : 23|8@0+ (0.005,0) [0|1] "" XXX
BO_ 550 BRAKE_MODULE: 8 XXX
SG_ BRAKE_PRESSURE : 0|9@0+ (1,0) [0|511] "" XXX
SG_ BRAKE_POSITION : 16|9@0+ (1,0) [0|511] "" XXX
SG_ BRAKE_PRESSED : 37|1@0+ (1,0) [0|1] "" XXX
BO_ 581 GAS_PEDAL: 5 XXX
SG_ GAS_PEDAL : 23|8@0+ (0.005,0) [0|1] "" XXX
BO_ 608 STEER_TORQUE_SENSOR: 8 XXX
SG_ STEER_TORQUE_EPS : 47|16@0- (1.00,0) [-20000|20000] "" XXX
SG_ STEER_TORQUE_EPS : 47|16@0- (0.73,0) [-20000|20000] "" XXX
SG_ STEER_TORQUE_DRIVER : 15|16@0- (1,0) [-32768|32767] "" XXX
SG_ STEER_OVERRIDE : 0|1@0+ (1,0) [0|1] "" XXX
SG_ CHECKSUM : 63|8@0+ (1,0) [0|255] "" XXX
SG_ STEER_ANGLE : 31|16@0- (0.0573,0) [-500|500] "" XXX
BO_ 610 EPS_STATUS: 5 EPS
SG_ IPAS_STATE : 3|4@0+ (1,0) [0|15] "" XXX
@@ -370,20 +381,16 @@ BO_ 610 EPS_STATUS: 5 EPS
SG_ CHECKSUM : 39|8@0+ (1,0) [0|255] "" XXX
BO_ 956 GEAR_PACKET: 8 XXX
SG_ SPORT_ON : 2|1@0+ (1,0) [0|1] "" XXX
SG_ GEAR : 13|6@0+ (1,0) [0|63] "" XXX
BO_ 1009 PCM_CRUISE_ISH: 8 XXX
SG_ MAIN_ON : 13|1@0+ (1,0) [0|3] "" XXX
SG_ CRUISE_STATE : 10|1@0+ (1,0) [0|1] "" XXX
SG_ SET_SPEED : 23|8@0+ (1,0) [0|255] "mph" XXX
BO_ 1599 LIGHT_STALK_ISH: 8 SCM
SG_ AUTO_HIGH_BEAM : 19|1@0+ (1,0) [0|1] "" XXX
SG_ ECON_ON : 40|1@0+ (1,0) [0|1] "" XXX
CM_ SG_ 550 BRAKE_PRESSURE "seems prop to pedal force";
CM_ SG_ 550 BRAKE_POSITION "seems proportional to pedal displacement, unclear the max value of 0x1c8";
CM_ SG_ 581 GAS_PEDAL "it seems slightly filtered";
CM_ SG_ 610 TYPE "seems 1 on Corolla, 0 on all others";
CM_ SG_ 1009 SET_SPEED "units seem to be whatever the car is set to";
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P";
VAL_ 610 IPAS_STATE 5 "override" 3 "enabled" 1 "disabled";
VAL_ 610 LKA_STATE 25 "temporary_fault" 9 "temporary_fault2" 5 "active" 1 "standby";
VAL_ 956 GEAR 0 "D" 1 "S" 8 "N" 16 "R" 32 "P";
VAL_ 956 SPORT_ON 0 "off" 1 "on";
VAL_ 956 ECON_ON 0 "off" 1 "on";
+2
View File
@@ -110,6 +110,8 @@ BO_ 281 Steering_Torque: 8 XXX
SG_ Steer_Torque_Sensor : 16|11@1- (-1,0) [0|3] "" XXX
SG_ Steering_Angle : 32|16@1- (-0.0217,0) [0|255] "" X
SG_ Steer_Torque_Output : 48|11@1- (-1,0) [0|31] "" XXX
SG_ Steer_Error_1 : 12|1@0+ (1,0) [0|7] "" XXX
SG_ Steer_Error_2 : 28|1@1+ (1,0) [0|3] "" XXX
BO_ 312 Brake_Pressure_L_R: 8 XXX
SG_ Checksum : 0|8@1+ (1,0) [0|31] "" XXX
+7 -4
View File
@@ -122,7 +122,12 @@ int get_bit_message(char *out, CAN_FIFOMailBox_TypeDef *to_bang) {
return len;
}
void TIM4_IRQ_Handler(void);
void setup_timer4(void) {
// register interrupt
REGISTER_INTERRUPT(TIM4_IRQn, TIM4_IRQ_Handler, 40000U, FAULT_INTERRUPT_RATE_GMLAN)
// setup
register_set(&(TIM4->PSC), (48-1), 0xFFFFU); // Tick on 1 us
register_set(&(TIM4->CR1), TIM_CR1_CEN, 0x3FU); // Enable
@@ -236,7 +241,6 @@ void TIM4_IRQ_Handler(void) {
gmlan_sendmax = -1; // exit
}
}
TIM4->SR = 0;
} else if (gmlan_alt_mode == GPIO_SWITCH) {
if ((TIM4->SR & TIM_SR_UIF) && (gmlan_switch_below_timeout != -1)) {
if ((can_timeout_counter == 0) && gmlan_switch_timeout_enable) {
@@ -259,10 +263,10 @@ void TIM4_IRQ_Handler(void) {
}
}
}
TIM4->SR = 0;
} else {
puts("invalid gmlan_alt_mode\n");
// Invalid GMLAN mode. Do not put a print statement here, way too fast to keep up with
}
TIM4->SR = 0;
}
bool bitbang_gmlan(CAN_FIFOMailBox_TypeDef *to_bang) {
@@ -280,7 +284,6 @@ bool bitbang_gmlan(CAN_FIFOMailBox_TypeDef *to_bang) {
set_gpio_mode(GPIOB, 13, MODE_OUTPUT);
// 33kbps
REGISTER_INTERRUPT(TIM4_IRQn, TIM4_IRQ_Handler, 40000U, FAULT_INTERRUPT_RATE_GMLAN)
setup_timer4();
}
return gmlan_send_ok;
+6 -10
View File
@@ -294,19 +294,11 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired)
break;
// **** 0xb0: set IR power
case 0xb0:
if(power_save_status == POWER_SAVE_STATUS_DISABLED){
current_board->set_ir_power(setup->b.wValue.w);
} else {
puts("Setting IR power not allowed in power saving mode\n");
}
current_board->set_ir_power(setup->b.wValue.w);
break;
// **** 0xb1: set fan power
case 0xb1:
if(power_save_status == POWER_SAVE_STATUS_DISABLED){
current_board->set_fan_power(setup->b.wValue.w);
} else {
puts("Setting fan power not allowed in power saving mode\n");
}
current_board->set_fan_power(setup->b.wValue.w);
break;
// **** 0xb2: get fan rpm
case 0xb2:
@@ -716,6 +708,10 @@ void TIM1_BRK_TIM9_IRQ_Handler(void) {
if (power_save_status != POWER_SAVE_STATUS_ENABLED) {
set_power_save_state(POWER_SAVE_STATUS_ENABLED);
}
// Also disable fan and IR when the heartbeat goes missing
current_board->set_fan_power(0U);
current_board->set_ir_power(0U);
}
// enter CDP mode when car starts to ensure we are charging a turned off EON
+1 -2
View File
@@ -49,10 +49,9 @@ void set_power_save_state(int state) {
set_gpio_output(GPIOA, 14, enable);
}
// Switch off IR and fan when in power saving
// Switch off IR when in power saving
if(!enable){
current_board->set_ir_power(0U);
current_board->set_fan_power(0U);
}
power_save_status = state;
+22 -10
View File
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import time
import struct
from collections import deque
from typing import Callable, NamedTuple, Tuple, List
from enum import IntEnum
@@ -275,11 +276,12 @@ class CanClient():
self.rx = can_recv
self.tx_addr = tx_addr
self.rx_addr = rx_addr
self.rx_buff = deque()
self.sub_addr = sub_addr
self.bus = bus
self.debug = debug
def _recv_filter(self, bus, addr):
def _recv_filter(self, bus: int, addr: int) -> bool:
# handle functional addresses (switch to first addr to respond)
if self.tx_addr == 0x7DF:
is_response = addr >= 0x7E8 and addr <= 0x7EF
@@ -296,12 +298,12 @@ class CanClient():
self.rx_addr = addr
return bus == self.bus and addr == self.rx_addr
def recv(self, drain=False) -> List[bytes]:
msg_array = []
def _recv_buffer(self, drain: bool=False) -> None:
while True:
msgs = self.rx()
if drain:
if self.debug: print("CAN-RX: drain - {}".format(len(msgs)))
self.rx_buff.clear()
else:
for rx_addr, rx_ts, rx_data, rx_bus in msgs or []:
if self._recv_filter(rx_bus, rx_addr) and len(rx_data) > 0:
@@ -313,15 +315,24 @@ class CanClient():
if self.sub_addr is not None:
rx_data = rx_data[1:]
msg_array.append(rx_data)
self.rx_buff.append(rx_data)
# break when non-full buffer is processed
if len(msgs) < 254:
return msg_array
return
def recv(self, drain: bool=False) -> List[bytes]:
# buffer rx messages in case two response messages are received at once
# (e.g. response pending and success/failure response)
self._recv_buffer(drain)
try:
while True:
yield self.rx_buff.popleft()
except IndexError:
pass # empty
def send(self, msgs: List[bytes], delay: float=0) -> None:
first = True
for msg in msgs:
if delay and not first:
for i, msg in enumerate(msgs):
if delay and i != 0:
if self.debug: print(f"CAN-TX: delay - {delay}")
time.sleep(delay)
@@ -332,8 +343,9 @@ class CanClient():
assert len(msg) <= 8
self.tx(self.tx_addr, msg, self.bus)
first = False
# prevent rx buffer from overflowing on large tx
if i % 10 == 9:
self._recv_buffer()
class IsoTpMessage():
def __init__(self, can_client: CanClient, timeout: float=1, debug: bool=False, max_len: int=8):
+52 -52
View File
@@ -1,52 +1,52 @@
Minpack Copyright Notice (1999) University of Chicago. All rights reserved
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above
copyright notice, this list of conditions and the following
disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
3. The end-user documentation included with the
redistribution, if any, must include the following
acknowledgment:
"This product includes software developed by the
University of Chicago, as Operator of Argonne National
Laboratory.
Alternately, this acknowledgment may appear in the software
itself, if and wherever such third-party acknowledgments
normally appear.
4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS"
WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE
UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE
OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY
OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF
THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)
DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL
BE CORRECTED.
5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT
HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,
INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF
ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF
PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER
SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT
(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,
EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE
POSSIBILITY OF SUCH LOSS OR DAMAGES.
Minpack Copyright Notice (1999) University of Chicago. All rights reserved
Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the
following conditions are met:
1. Redistributions of source code must retain the above
copyright notice, this list of conditions and the following
disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
3. The end-user documentation included with the
redistribution, if any, must include the following
acknowledgment:
"This product includes software developed by the
University of Chicago, as Operator of Argonne National
Laboratory.
Alternately, this acknowledgment may appear in the software
itself, if and wherever such third-party acknowledgments
normally appear.
4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS"
WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE
UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE
OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY
OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF
THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)
DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL
BE CORRECTED.
5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT
HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,
INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF
ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF
PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER
SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT
(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,
EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE
POSSIBILITY OF SUCH LOSS OR DAMAGES.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-247
View File
@@ -1,247 +0,0 @@
// ISO C9x compliant stdint.h for Microsoft Visual Studio
// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
//
// Copyright (c) 2006-2008 Alexander Chemeris
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// 3. The name of the author may be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
///////////////////////////////////////////////////////////////////////////////
#ifndef _MSC_VER // [
#error "Use this header only with Microsoft Visual C++ compilers!"
#endif // _MSC_VER ]
#ifndef _MSC_STDINT_H_ // [
#define _MSC_STDINT_H_
#if _MSC_VER > 1000
#pragma once
#endif
#include <limits.h>
// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
// or compiler give many errors like this:
// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
#ifdef __cplusplus
extern "C" {
#endif
# include <wchar.h>
#ifdef __cplusplus
}
#endif
// Define _W64 macros to mark types changing their size, like intptr_t.
#ifndef _W64
# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
# define _W64 __w64
# else
# define _W64
# endif
#endif
// 7.18.1 Integer types
// 7.18.1.1 Exact-width integer types
// Visual Studio 6 and Embedded Visual C++ 4 doesn't
// realize that, e.g. char has the same size as __int8
// so we give up on __intX for them.
#if (_MSC_VER < 1300)
typedef signed char int8_t;
typedef signed short int16_t;
typedef signed int int32_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#else
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
#endif
typedef signed __int64 int64_t;
typedef unsigned __int64 uint64_t;
// 7.18.1.2 Minimum-width integer types
typedef int8_t int_least8_t;
typedef int16_t int_least16_t;
typedef int32_t int_least32_t;
typedef int64_t int_least64_t;
typedef uint8_t uint_least8_t;
typedef uint16_t uint_least16_t;
typedef uint32_t uint_least32_t;
typedef uint64_t uint_least64_t;
// 7.18.1.3 Fastest minimum-width integer types
typedef int8_t int_fast8_t;
typedef int16_t int_fast16_t;
typedef int32_t int_fast32_t;
typedef int64_t int_fast64_t;
typedef uint8_t uint_fast8_t;
typedef uint16_t uint_fast16_t;
typedef uint32_t uint_fast32_t;
typedef uint64_t uint_fast64_t;
// 7.18.1.4 Integer types capable of holding object pointers
#ifdef _WIN64 // [
typedef signed __int64 intptr_t;
typedef unsigned __int64 uintptr_t;
#else // _WIN64 ][
typedef _W64 signed int intptr_t;
typedef _W64 unsigned int uintptr_t;
#endif // _WIN64 ]
// 7.18.1.5 Greatest-width integer types
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
// 7.18.2 Limits of specified-width integer types
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
// 7.18.2.1 Limits of exact-width integer types
#define INT8_MIN ((int8_t)_I8_MIN)
#define INT8_MAX _I8_MAX
#define INT16_MIN ((int16_t)_I16_MIN)
#define INT16_MAX _I16_MAX
#define INT32_MIN ((int32_t)_I32_MIN)
#define INT32_MAX _I32_MAX
#define INT64_MIN ((int64_t)_I64_MIN)
#define INT64_MAX _I64_MAX
#define UINT8_MAX _UI8_MAX
#define UINT16_MAX _UI16_MAX
#define UINT32_MAX _UI32_MAX
#define UINT64_MAX _UI64_MAX
// 7.18.2.2 Limits of minimum-width integer types
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST64_MIN INT64_MIN
#define INT_LEAST64_MAX INT64_MAX
#define UINT_LEAST8_MAX UINT8_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define UINT_LEAST64_MAX UINT64_MAX
// 7.18.2.3 Limits of fastest minimum-width integer types
#define INT_FAST8_MIN INT8_MIN
#define INT_FAST8_MAX INT8_MAX
#define INT_FAST16_MIN INT16_MIN
#define INT_FAST16_MAX INT16_MAX
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST64_MIN INT64_MIN
#define INT_FAST64_MAX INT64_MAX
#define UINT_FAST8_MAX UINT8_MAX
#define UINT_FAST16_MAX UINT16_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
// 7.18.2.4 Limits of integer types capable of holding object pointers
#ifdef _WIN64 // [
# define INTPTR_MIN INT64_MIN
# define INTPTR_MAX INT64_MAX
# define UINTPTR_MAX UINT64_MAX
#else // _WIN64 ][
# define INTPTR_MIN INT32_MIN
# define INTPTR_MAX INT32_MAX
# define UINTPTR_MAX UINT32_MAX
#endif // _WIN64 ]
// 7.18.2.5 Limits of greatest-width integer types
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
// 7.18.3 Limits of other integer types
#ifdef _WIN64 // [
# define PTRDIFF_MIN _I64_MIN
# define PTRDIFF_MAX _I64_MAX
#else // _WIN64 ][
# define PTRDIFF_MIN _I32_MIN
# define PTRDIFF_MAX _I32_MAX
#endif // _WIN64 ]
#define SIG_ATOMIC_MIN INT_MIN
#define SIG_ATOMIC_MAX INT_MAX
#ifndef SIZE_MAX // [
# ifdef _WIN64 // [
# define SIZE_MAX _UI64_MAX
# else // _WIN64 ][
# define SIZE_MAX _UI32_MAX
# endif // _WIN64 ]
#endif // SIZE_MAX ]
// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
#ifndef WCHAR_MIN // [
# define WCHAR_MIN 0
#endif // WCHAR_MIN ]
#ifndef WCHAR_MAX // [
# define WCHAR_MAX _UI16_MAX
#endif // WCHAR_MAX ]
#define WINT_MIN 0
#define WINT_MAX _UI16_MAX
#endif // __STDC_LIMIT_MACROS ]
// 7.18.4 Limits of other integer types
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
// 7.18.4.1 Macros for minimum-width integer constants
#define INT8_C(val) val##i8
#define INT16_C(val) val##i16
#define INT32_C(val) val##i32
#define INT64_C(val) val##i64
#define UINT8_C(val) val##ui8
#define UINT16_C(val) val##ui16
#define UINT32_C(val) val##ui32
#define UINT64_C(val) val##ui64
// 7.18.4.2 Macros for greatest-width integer constants
#define INTMAX_C INT64_C
#define UINTMAX_C UINT64_C
#endif // __STDC_CONSTANT_MACROS ]
#endif // _MSC_STDINT_H_ ]
Binary file not shown.
-42
View File
@@ -1,42 +0,0 @@
set -e
echo "Installing capnp"
cd /tmp
VERSION=0.6.1
wget https://capnproto.org/capnproto-c++-${VERSION}.tar.gz
tar xvf capnproto-c++-${VERSION}.tar.gz
cd capnproto-c++-${VERSION}
CXXFLAGS="-fPIC" ./configure
make -j4
make install
# manually build binaries statically
g++ -std=gnu++11 -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -pthread -o .libs/capnp src/capnp/compiler/module-loader.o src/capnp/compiler/capnp.o ./.libs/libcapnpc.a ./.libs/libcapnp.a ./.libs/libkj.a -lpthread -pthread
g++ -std=gnu++11 -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -pthread -o .libs/capnpc-c++ src/capnp/compiler/capnpc-c++.o ./.libs/libcapnp.a ./.libs/libkj.a -lpthread -pthread
g++ -std=gnu++11 -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -pthread -o .libs/capnpc-capnp src/capnp/compiler/capnpc-capnp.o ./.libs/libcapnp.a ./.libs/libkj.a -lpthread -pthread
cp .libs/capnp /usr/local/bin/
rm /usr/local/bin/capnpc
ln -s /usr/local/bin/capnp /usr/local/bin/capnpc
cp .libs/capnpc-c++ /usr/local/bin/
cp .libs/capnpc-capnp /usr/local/bin/
cp .libs/*.a /usr/local/lib
cd /tmp
echo "Installing c-capnp"
git clone https://github.com/commaai/c-capnproto.git
cd c-capnproto
git submodule update --init --recursive
autoreconf -f -i -s
CXXFLAGS="-fPIC" ./configure
make -j4
make install
# manually build binaries statically
gcc -fPIC -o .libs/capnpc-c compiler/capnpc-c.o compiler/schema.capnp.o compiler/str.o ./.libs/libcapnp_c.a
cp .libs/capnpc-c /usr/local/bin/
cp .libs/*.a /usr/local/lib
-29
View File
@@ -1,29 +0,0 @@
Copyright 2011 The LibYuv Project Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Google nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-29
View File
@@ -1,29 +0,0 @@
Copyright 2011 The LibYuv Project Authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
* Neither the name of Google nor the names of its contributors may
be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-4
View File
@@ -1,4 +0,0 @@
git clone https://chromium.googlesource.com/libyuv/libyuv
cd libyuv
git reset --hard 4a14cb2e81235ecd656e799aecaaf139db8ce4a2
cmake .
Binary file not shown.
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
../include
Binary file not shown.
+189 -189
View File
@@ -1,189 +1,189 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/Bounds.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of the Bounds class designed to manage working sets of
* bounds within a QProblem.
*/
#ifndef QPOASES_BOUNDS_HPP
#define QPOASES_BOUNDS_HPP
#include <SubjectTo.hpp>
/** This class manages working sets of bounds by storing
* index sets and other status information.
*
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*/
class Bounds : public SubjectTo
{
/*
* PUBLIC MEMBER FUNCTIONS
*/
public:
/** Default constructor. */
Bounds( );
/** Copy constructor (deep copy). */
Bounds( const Bounds& rhs /**< Rhs object. */
);
/** Destructor. */
~Bounds( );
/** Assignment operator (deep copy). */
Bounds& operator=( const Bounds& rhs /**< Rhs object. */
);
/** Pseudo-constructor takes the number of bounds.
* \return SUCCESSFUL_RETURN */
returnValue init( int n /**< Number of bounds. */
);
/** Initially adds number of a new (i.e. not yet in the list) bound to
* given index set.
* \return SUCCESSFUL_RETURN \n
RET_SETUP_BOUND_FAILED \n
RET_INDEX_OUT_OF_BOUNDS \n
RET_INVALID_ARGUMENTS */
returnValue setupBound( int _number, /**< Number of new bound. */
SubjectToStatus _status /**< Status of new bound. */
);
/** Initially adds all numbers of new (i.e. not yet in the list) bounds to
* to the index set of free bounds; the order depends on the SujectToType
* of each index.
* \return SUCCESSFUL_RETURN \n
RET_SETUP_BOUND_FAILED */
returnValue setupAllFree( );
/** Moves index of a bound from index list of fixed to that of free bounds.
* \return SUCCESSFUL_RETURN \n
RET_MOVING_BOUND_FAILED \n
RET_INDEX_OUT_OF_BOUNDS */
returnValue moveFixedToFree( int _number /**< Number of bound to be freed. */
);
/** Moves index of a bound from index list of free to that of fixed bounds.
* \return SUCCESSFUL_RETURN \n
RET_MOVING_BOUND_FAILED \n
RET_INDEX_OUT_OF_BOUNDS */
returnValue moveFreeToFixed( int _number, /**< Number of bound to be fixed. */
SubjectToStatus _status /**< Status of bound to be fixed. */
);
/** Swaps the indices of two free bounds within the index set.
* \return SUCCESSFUL_RETURN \n
RET_SWAPINDEX_FAILED */
returnValue swapFree( int number1, /**< Number of first constraint or bound. */
int number2 /**< Number of second constraint or bound. */
);
/** Returns number of variables.
* \return Number of variables. */
inline int getNV( ) const;
/** Returns number of implicitly fixed variables.
* \return Number of implicitly fixed variables. */
inline int getNFV( ) const;
/** Returns number of bounded (but possibly free) variables.
* \return Number of bounded (but possibly free) variables. */
inline int getNBV( ) const;
/** Returns number of unbounded variables.
* \return Number of unbounded variables. */
inline int getNUV( ) const;
/** Sets number of implicitly fixed variables.
* \return SUCCESSFUL_RETURN */
inline returnValue setNFV( int n /**< Number of implicitly fixed variables. */
);
/** Sets number of bounded (but possibly free) variables.
* \return SUCCESSFUL_RETURN */
inline returnValue setNBV( int n /**< Number of bounded (but possibly free) variables. */
);
/** Sets number of unbounded variables.
* \return SUCCESSFUL_RETURN */
inline returnValue setNUV( int n /**< Number of unbounded variables */
);
/** Returns number of free variables.
* \return Number of free variables. */
inline int getNFR( );
/** Returns number of fixed variables.
* \return Number of fixed variables. */
inline int getNFX( );
/** Returns a pointer to free variables index list.
* \return Pointer to free variables index list. */
inline Indexlist* getFree( );
/** Returns a pointer to fixed variables index list.
* \return Pointer to fixed variables index list. */
inline Indexlist* getFixed( );
/*
* PROTECTED MEMBER VARIABLES
*/
protected:
int nV; /**< Number of variables (nV = nFV + nBV + nUV). */
int nFV; /**< Number of implicitly fixed variables. */
int nBV; /**< Number of bounded (but possibly free) variables. */
int nUV; /**< Number of unbounded variables. */
Indexlist free; /**< Index list of free variables. */
Indexlist fixed; /**< Index list of fixed variables. */
};
#include <Bounds.ipp>
#endif /* QPOASES_BOUNDS_HPP */
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/Bounds.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of the Bounds class designed to manage working sets of
* bounds within a QProblem.
*/
#ifndef QPOASES_BOUNDS_HPP
#define QPOASES_BOUNDS_HPP
#include <SubjectTo.hpp>
/** This class manages working sets of bounds by storing
* index sets and other status information.
*
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*/
class Bounds : public SubjectTo
{
/*
* PUBLIC MEMBER FUNCTIONS
*/
public:
/** Default constructor. */
Bounds( );
/** Copy constructor (deep copy). */
Bounds( const Bounds& rhs /**< Rhs object. */
);
/** Destructor. */
~Bounds( );
/** Assignment operator (deep copy). */
Bounds& operator=( const Bounds& rhs /**< Rhs object. */
);
/** Pseudo-constructor takes the number of bounds.
* \return SUCCESSFUL_RETURN */
returnValue init( int n /**< Number of bounds. */
);
/** Initially adds number of a new (i.e. not yet in the list) bound to
* given index set.
* \return SUCCESSFUL_RETURN \n
RET_SETUP_BOUND_FAILED \n
RET_INDEX_OUT_OF_BOUNDS \n
RET_INVALID_ARGUMENTS */
returnValue setupBound( int _number, /**< Number of new bound. */
SubjectToStatus _status /**< Status of new bound. */
);
/** Initially adds all numbers of new (i.e. not yet in the list) bounds to
* to the index set of free bounds; the order depends on the SujectToType
* of each index.
* \return SUCCESSFUL_RETURN \n
RET_SETUP_BOUND_FAILED */
returnValue setupAllFree( );
/** Moves index of a bound from index list of fixed to that of free bounds.
* \return SUCCESSFUL_RETURN \n
RET_MOVING_BOUND_FAILED \n
RET_INDEX_OUT_OF_BOUNDS */
returnValue moveFixedToFree( int _number /**< Number of bound to be freed. */
);
/** Moves index of a bound from index list of free to that of fixed bounds.
* \return SUCCESSFUL_RETURN \n
RET_MOVING_BOUND_FAILED \n
RET_INDEX_OUT_OF_BOUNDS */
returnValue moveFreeToFixed( int _number, /**< Number of bound to be fixed. */
SubjectToStatus _status /**< Status of bound to be fixed. */
);
/** Swaps the indices of two free bounds within the index set.
* \return SUCCESSFUL_RETURN \n
RET_SWAPINDEX_FAILED */
returnValue swapFree( int number1, /**< Number of first constraint or bound. */
int number2 /**< Number of second constraint or bound. */
);
/** Returns number of variables.
* \return Number of variables. */
inline int getNV( ) const;
/** Returns number of implicitly fixed variables.
* \return Number of implicitly fixed variables. */
inline int getNFV( ) const;
/** Returns number of bounded (but possibly free) variables.
* \return Number of bounded (but possibly free) variables. */
inline int getNBV( ) const;
/** Returns number of unbounded variables.
* \return Number of unbounded variables. */
inline int getNUV( ) const;
/** Sets number of implicitly fixed variables.
* \return SUCCESSFUL_RETURN */
inline returnValue setNFV( int n /**< Number of implicitly fixed variables. */
);
/** Sets number of bounded (but possibly free) variables.
* \return SUCCESSFUL_RETURN */
inline returnValue setNBV( int n /**< Number of bounded (but possibly free) variables. */
);
/** Sets number of unbounded variables.
* \return SUCCESSFUL_RETURN */
inline returnValue setNUV( int n /**< Number of unbounded variables */
);
/** Returns number of free variables.
* \return Number of free variables. */
inline int getNFR( );
/** Returns number of fixed variables.
* \return Number of fixed variables. */
inline int getNFX( );
/** Returns a pointer to free variables index list.
* \return Pointer to free variables index list. */
inline Indexlist* getFree( );
/** Returns a pointer to fixed variables index list.
* \return Pointer to fixed variables index list. */
inline Indexlist* getFixed( );
/*
* PROTECTED MEMBER VARIABLES
*/
protected:
int nV; /**< Number of variables (nV = nFV + nBV + nUV). */
int nFV; /**< Number of implicitly fixed variables. */
int nBV; /**< Number of bounded (but possibly free) variables. */
int nUV; /**< Number of unbounded variables. */
Indexlist free; /**< Index list of free variables. */
Indexlist fixed; /**< Index list of fixed variables. */
};
#include <Bounds.ipp>
#endif /* QPOASES_BOUNDS_HPP */
/*
* end of file
*/
+108 -108
View File
@@ -1,108 +1,108 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/Constants.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2008
*
* Definition of all global constants.
*/
#ifndef QPOASES_CONSTANTS_HPP
#define QPOASES_CONSTANTS_HPP
#ifndef QPOASES_CUSTOM_INTERFACE
#include "acado_qpoases_interface.hpp"
#else
#define XSTR(x) #x
#define STR(x) XSTR(x)
#include STR(QPOASES_CUSTOM_INTERFACE)
#endif
/** Maximum number of variables within a QP formulation.
Note: this value has to be positive! */
const int NVMAX = QPOASES_NVMAX;
/** Maximum number of constraints within a QP formulation.
Note: this value has to be positive! */
const int NCMAX = QPOASES_NCMAX;
/** Redefinition of NCMAX used for memory allocation, to avoid zero sized arrays
and compiler errors. */
const int NCMAX_ALLOC = (NCMAX == 0) ? 1 : NCMAX;
/**< Maximum number of working set recalculations.
Note: this value has to be positive! */
const int NWSRMAX = QPOASES_NWSRMAX;
/** Desired KKT tolerance of QP solution; a warning RET_INACCURATE_SOLUTION is
* issued if this tolerance is not met.
* Note: this value has to be positive! */
const real_t DESIREDACCURACY = (real_t) 1.0e-3;
/** Critical KKT tolerance of QP solution; an error is issued if this
* tolerance is not met.
* Note: this value has to be positive! */
const real_t CRITICALACCURACY = (real_t) 1.0e-2;
/** Numerical value of machine precision (min eps, s.t. 1+eps > 1).
Note: this value has to be positive! */
const real_t EPS = (real_t) QPOASES_EPS;
/** Numerical value of zero (for situations in which it would be
* unreasonable to compare with 0.0).
* Note: this value has to be positive! */
const real_t ZERO = (real_t) 1.0e-50;
/** Numerical value of infinity (e.g. for non-existing bounds).
* Note: this value has to be positive! */
const real_t INFTY = (real_t) 1.0e12;
/** Lower/upper (constraints') bound tolerance (an inequality constraint
* whose lower and upper bound differ by less than BOUNDTOL is regarded
* to be an equality constraint).
* Note: this value has to be positive! */
const real_t BOUNDTOL = (real_t) 1.0e-10;
/** Offset for relaxing (constraints') bounds at beginning of an initial homotopy.
* Note: this value has to be positive! */
const real_t BOUNDRELAXATION = (real_t) 1.0e3;
/** Factor that determines physical lengths of index lists.
* Note: this value has to be greater than 1! */
const int INDEXLISTFACTOR = 5;
#endif /* QPOASES_CONSTANTS_HPP */
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/Constants.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2008
*
* Definition of all global constants.
*/
#ifndef QPOASES_CONSTANTS_HPP
#define QPOASES_CONSTANTS_HPP
#ifndef QPOASES_CUSTOM_INTERFACE
#include "acado_qpoases_interface.hpp"
#else
#define XSTR(x) #x
#define STR(x) XSTR(x)
#include STR(QPOASES_CUSTOM_INTERFACE)
#endif
/** Maximum number of variables within a QP formulation.
Note: this value has to be positive! */
const int NVMAX = QPOASES_NVMAX;
/** Maximum number of constraints within a QP formulation.
Note: this value has to be positive! */
const int NCMAX = QPOASES_NCMAX;
/** Redefinition of NCMAX used for memory allocation, to avoid zero sized arrays
and compiler errors. */
const int NCMAX_ALLOC = (NCMAX == 0) ? 1 : NCMAX;
/**< Maximum number of working set recalculations.
Note: this value has to be positive! */
const int NWSRMAX = QPOASES_NWSRMAX;
/** Desired KKT tolerance of QP solution; a warning RET_INACCURATE_SOLUTION is
* issued if this tolerance is not met.
* Note: this value has to be positive! */
const real_t DESIREDACCURACY = (real_t) 1.0e-3;
/** Critical KKT tolerance of QP solution; an error is issued if this
* tolerance is not met.
* Note: this value has to be positive! */
const real_t CRITICALACCURACY = (real_t) 1.0e-2;
/** Numerical value of machine precision (min eps, s.t. 1+eps > 1).
Note: this value has to be positive! */
const real_t EPS = (real_t) QPOASES_EPS;
/** Numerical value of zero (for situations in which it would be
* unreasonable to compare with 0.0).
* Note: this value has to be positive! */
const real_t ZERO = (real_t) 1.0e-50;
/** Numerical value of infinity (e.g. for non-existing bounds).
* Note: this value has to be positive! */
const real_t INFTY = (real_t) 1.0e12;
/** Lower/upper (constraints') bound tolerance (an inequality constraint
* whose lower and upper bound differ by less than BOUNDTOL is regarded
* to be an equality constraint).
* Note: this value has to be positive! */
const real_t BOUNDTOL = (real_t) 1.0e-10;
/** Offset for relaxing (constraints') bounds at beginning of an initial homotopy.
* Note: this value has to be positive! */
const real_t BOUNDRELAXATION = (real_t) 1.0e3;
/** Factor that determines physical lengths of index lists.
* Note: this value has to be greater than 1! */
const int INDEXLISTFACTOR = 5;
#endif /* QPOASES_CONSTANTS_HPP */
/*
* end of file
*/
+181 -181
View File
@@ -1,181 +1,181 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/Constraints.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of the Constraints class designed to manage working sets of
* constraints within a QProblem.
*/
#ifndef QPOASES_CONSTRAINTS_HPP
#define QPOASES_CONSTRAINTS_HPP
#include <SubjectTo.hpp>
/** This class manages working sets of constraints by storing
* index sets and other status information.
*
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*/
class Constraints : public SubjectTo
{
/*
* PUBLIC MEMBER FUNCTIONS
*/
public:
/** Default constructor. */
Constraints( );
/** Copy constructor (deep copy). */
Constraints( const Constraints& rhs /**< Rhs object. */
);
/** Destructor. */
~Constraints( );
/** Assignment operator (deep copy). */
Constraints& operator=( const Constraints& rhs /**< Rhs object. */
);
/** Pseudo-constructor takes the number of constraints.
* \return SUCCESSFUL_RETURN */
returnValue init( int n /**< Number of constraints. */
);
/** Initially adds number of a new (i.e. not yet in the list) constraint to
* a given index set.
* \return SUCCESSFUL_RETURN \n
RET_SETUP_CONSTRAINT_FAILED \n
RET_INDEX_OUT_OF_BOUNDS \n
RET_INVALID_ARGUMENTS */
returnValue setupConstraint( int _number, /**< Number of new constraint. */
SubjectToStatus _status /**< Status of new constraint. */
);
/** Initially adds all enabled numbers of new (i.e. not yet in the list) constraints to
* to the index set of inactive constraints; the order depends on the SujectToType
* of each index. Only disabled constraints are added to index set of disabled constraints!
* \return SUCCESSFUL_RETURN \n
RET_SETUP_CONSTRAINT_FAILED */
returnValue setupAllInactive( );
/** Moves index of a constraint from index list of active to that of inactive constraints.
* \return SUCCESSFUL_RETURN \n
RET_MOVING_CONSTRAINT_FAILED */
returnValue moveActiveToInactive( int _number /**< Number of constraint to become inactive. */
);
/** Moves index of a constraint from index list of inactive to that of active constraints.
* \return SUCCESSFUL_RETURN \n
RET_MOVING_CONSTRAINT_FAILED */
returnValue moveInactiveToActive( int _number, /**< Number of constraint to become active. */
SubjectToStatus _status /**< Status of constraint to become active. */
);
/** Returns the number of constraints.
* \return Number of constraints. */
inline int getNC( ) const;
/** Returns the number of implicit equality constraints.
* \return Number of implicit equality constraints. */
inline int getNEC( ) const;
/** Returns the number of "real" inequality constraints.
* \return Number of "real" inequality constraints. */
inline int getNIC( ) const;
/** Returns the number of unbounded constraints (i.e. without any bounds).
* \return Number of unbounded constraints (i.e. without any bounds). */
inline int getNUC( ) const;
/** Sets number of implicit equality constraints.
* \return SUCCESSFUL_RETURN */
inline returnValue setNEC( int n /**< Number of implicit equality constraints. */
);
/** Sets number of "real" inequality constraints.
* \return SUCCESSFUL_RETURN */
inline returnValue setNIC( int n /**< Number of "real" inequality constraints. */
);
/** Sets number of unbounded constraints (i.e. without any bounds).
* \return SUCCESSFUL_RETURN */
inline returnValue setNUC( int n /**< Number of unbounded constraints (i.e. without any bounds). */
);
/** Returns the number of active constraints.
* \return Number of constraints. */
inline int getNAC( );
/** Returns the number of inactive constraints.
* \return Number of constraints. */
inline int getNIAC( );
/** Returns a pointer to active constraints index list.
* \return Pointer to active constraints index list. */
inline Indexlist* getActive( );
/** Returns a pointer to inactive constraints index list.
* \return Pointer to inactive constraints index list. */
inline Indexlist* getInactive( );
/*
* PROTECTED MEMBER VARIABLES
*/
protected:
int nC; /**< Number of constraints (nC = nEC + nIC + nUC). */
int nEC; /**< Number of implicit equality constraints. */
int nIC; /**< Number of "real" inequality constraints. */
int nUC; /**< Number of unbounded constraints (i.e. without any bounds). */
Indexlist active; /**< Index list of active constraints. */
Indexlist inactive; /**< Index list of inactive constraints. */
};
#include <Constraints.ipp>
#endif /* QPOASES_CONSTRAINTS_HPP */
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/Constraints.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of the Constraints class designed to manage working sets of
* constraints within a QProblem.
*/
#ifndef QPOASES_CONSTRAINTS_HPP
#define QPOASES_CONSTRAINTS_HPP
#include <SubjectTo.hpp>
/** This class manages working sets of constraints by storing
* index sets and other status information.
*
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*/
class Constraints : public SubjectTo
{
/*
* PUBLIC MEMBER FUNCTIONS
*/
public:
/** Default constructor. */
Constraints( );
/** Copy constructor (deep copy). */
Constraints( const Constraints& rhs /**< Rhs object. */
);
/** Destructor. */
~Constraints( );
/** Assignment operator (deep copy). */
Constraints& operator=( const Constraints& rhs /**< Rhs object. */
);
/** Pseudo-constructor takes the number of constraints.
* \return SUCCESSFUL_RETURN */
returnValue init( int n /**< Number of constraints. */
);
/** Initially adds number of a new (i.e. not yet in the list) constraint to
* a given index set.
* \return SUCCESSFUL_RETURN \n
RET_SETUP_CONSTRAINT_FAILED \n
RET_INDEX_OUT_OF_BOUNDS \n
RET_INVALID_ARGUMENTS */
returnValue setupConstraint( int _number, /**< Number of new constraint. */
SubjectToStatus _status /**< Status of new constraint. */
);
/** Initially adds all enabled numbers of new (i.e. not yet in the list) constraints to
* to the index set of inactive constraints; the order depends on the SujectToType
* of each index. Only disabled constraints are added to index set of disabled constraints!
* \return SUCCESSFUL_RETURN \n
RET_SETUP_CONSTRAINT_FAILED */
returnValue setupAllInactive( );
/** Moves index of a constraint from index list of active to that of inactive constraints.
* \return SUCCESSFUL_RETURN \n
RET_MOVING_CONSTRAINT_FAILED */
returnValue moveActiveToInactive( int _number /**< Number of constraint to become inactive. */
);
/** Moves index of a constraint from index list of inactive to that of active constraints.
* \return SUCCESSFUL_RETURN \n
RET_MOVING_CONSTRAINT_FAILED */
returnValue moveInactiveToActive( int _number, /**< Number of constraint to become active. */
SubjectToStatus _status /**< Status of constraint to become active. */
);
/** Returns the number of constraints.
* \return Number of constraints. */
inline int getNC( ) const;
/** Returns the number of implicit equality constraints.
* \return Number of implicit equality constraints. */
inline int getNEC( ) const;
/** Returns the number of "real" inequality constraints.
* \return Number of "real" inequality constraints. */
inline int getNIC( ) const;
/** Returns the number of unbounded constraints (i.e. without any bounds).
* \return Number of unbounded constraints (i.e. without any bounds). */
inline int getNUC( ) const;
/** Sets number of implicit equality constraints.
* \return SUCCESSFUL_RETURN */
inline returnValue setNEC( int n /**< Number of implicit equality constraints. */
);
/** Sets number of "real" inequality constraints.
* \return SUCCESSFUL_RETURN */
inline returnValue setNIC( int n /**< Number of "real" inequality constraints. */
);
/** Sets number of unbounded constraints (i.e. without any bounds).
* \return SUCCESSFUL_RETURN */
inline returnValue setNUC( int n /**< Number of unbounded constraints (i.e. without any bounds). */
);
/** Returns the number of active constraints.
* \return Number of constraints. */
inline int getNAC( );
/** Returns the number of inactive constraints.
* \return Number of constraints. */
inline int getNIAC( );
/** Returns a pointer to active constraints index list.
* \return Pointer to active constraints index list. */
inline Indexlist* getActive( );
/** Returns a pointer to inactive constraints index list.
* \return Pointer to inactive constraints index list. */
inline Indexlist* getInactive( );
/*
* PROTECTED MEMBER VARIABLES
*/
protected:
int nC; /**< Number of constraints (nC = nEC + nIC + nUC). */
int nEC; /**< Number of implicit equality constraints. */
int nIC; /**< Number of "real" inequality constraints. */
int nUC; /**< Number of unbounded constraints (i.e. without any bounds). */
Indexlist active; /**< Index list of active constraints. */
Indexlist inactive; /**< Index list of inactive constraints. */
};
#include <Constraints.ipp>
#endif /* QPOASES_CONSTRAINTS_HPP */
/*
* end of file
*/
+126 -126
View File
@@ -1,126 +1,126 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/CyclingManager.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of the CyclingManager class designed to detect
* and handle possible cycling during QP iterations.
*/
#ifndef QPOASES_CYCLINGMANAGER_HPP
#define QPOASES_CYCLINGMANAGER_HPP
#include <Utils.hpp>
/** This class is intended to detect and handle possible cycling during QP iterations.
* As cycling seems to occur quite rarely, this class is NOT FULLY IMPLEMENTED YET!
*
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*/
class CyclingManager
{
/*
* PUBLIC MEMBER FUNCTIONS
*/
public:
/** Default constructor. */
CyclingManager( );
/** Copy constructor (deep copy). */
CyclingManager( const CyclingManager& rhs /**< Rhs object. */
);
/** Destructor. */
~CyclingManager( );
/** Copy asingment operator (deep copy). */
CyclingManager& operator=( const CyclingManager& rhs /**< Rhs object. */
);
/** Pseudo-constructor which takes the number of bounds/constraints.
* \return SUCCESSFUL_RETURN */
returnValue init( int _nV, /**< Number of bounds to be managed. */
int _nC /**< Number of constraints to be managed. */
);
/** Stores index of a bound/constraint that might cause cycling.
* \return SUCCESSFUL_RETURN \n
RET_INDEX_OUT_OF_BOUNDS */
returnValue setCyclingStatus( int number, /**< Number of bound/constraint. */
BooleanType isBound, /**< Flag that indicates if given number corresponds to a
* bound (BT_TRUE) or a constraint (BT_FALSE). */
CyclingStatus _status /**< Cycling status of bound/constraint. */
);
/** Returns if bound/constraint might cause cycling.
* \return BT_TRUE: bound/constraint might cause cycling \n
BT_FALSE: otherwise */
CyclingStatus getCyclingStatus( int number, /**< Number of bound/constraint. */
BooleanType isBound /**< Flag that indicates if given number corresponds to
* a bound (BT_TRUE) or a constraint (BT_FALSE). */
) const;
/** Clears all previous cycling information.
* \return SUCCESSFUL_RETURN */
returnValue clearCyclingData( );
/** Returns if cycling was detected.
* \return BT_TRUE iff cycling was detected. */
inline BooleanType isCyclingDetected( ) const;
/*
* PROTECTED MEMBER VARIABLES
*/
protected:
int nV; /**< Number of managed bounds. */
int nC; /**< Number of managed constraints. */
CyclingStatus status[NVMAX+NCMAX]; /**< Array to store cycling status of all bounds/constraints. */
BooleanType cyclingDetected; /**< Flag if cycling was detected. */
};
#include <CyclingManager.ipp>
#endif /* QPOASES_CYCLINGMANAGER_HPP */
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/CyclingManager.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of the CyclingManager class designed to detect
* and handle possible cycling during QP iterations.
*/
#ifndef QPOASES_CYCLINGMANAGER_HPP
#define QPOASES_CYCLINGMANAGER_HPP
#include <Utils.hpp>
/** This class is intended to detect and handle possible cycling during QP iterations.
* As cycling seems to occur quite rarely, this class is NOT FULLY IMPLEMENTED YET!
*
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*/
class CyclingManager
{
/*
* PUBLIC MEMBER FUNCTIONS
*/
public:
/** Default constructor. */
CyclingManager( );
/** Copy constructor (deep copy). */
CyclingManager( const CyclingManager& rhs /**< Rhs object. */
);
/** Destructor. */
~CyclingManager( );
/** Copy asingment operator (deep copy). */
CyclingManager& operator=( const CyclingManager& rhs /**< Rhs object. */
);
/** Pseudo-constructor which takes the number of bounds/constraints.
* \return SUCCESSFUL_RETURN */
returnValue init( int _nV, /**< Number of bounds to be managed. */
int _nC /**< Number of constraints to be managed. */
);
/** Stores index of a bound/constraint that might cause cycling.
* \return SUCCESSFUL_RETURN \n
RET_INDEX_OUT_OF_BOUNDS */
returnValue setCyclingStatus( int number, /**< Number of bound/constraint. */
BooleanType isBound, /**< Flag that indicates if given number corresponds to a
* bound (BT_TRUE) or a constraint (BT_FALSE). */
CyclingStatus _status /**< Cycling status of bound/constraint. */
);
/** Returns if bound/constraint might cause cycling.
* \return BT_TRUE: bound/constraint might cause cycling \n
BT_FALSE: otherwise */
CyclingStatus getCyclingStatus( int number, /**< Number of bound/constraint. */
BooleanType isBound /**< Flag that indicates if given number corresponds to
* a bound (BT_TRUE) or a constraint (BT_FALSE). */
) const;
/** Clears all previous cycling information.
* \return SUCCESSFUL_RETURN */
returnValue clearCyclingData( );
/** Returns if cycling was detected.
* \return BT_TRUE iff cycling was detected. */
inline BooleanType isCyclingDetected( ) const;
/*
* PROTECTED MEMBER VARIABLES
*/
protected:
int nV; /**< Number of managed bounds. */
int nC; /**< Number of managed constraints. */
CyclingStatus status[NVMAX+NCMAX]; /**< Array to store cycling status of all bounds/constraints. */
BooleanType cyclingDetected; /**< Flag if cycling was detected. */
};
#include <CyclingManager.ipp>
#endif /* QPOASES_CYCLINGMANAGER_HPP */
/*
* end of file
*/
+154 -154
View File
@@ -1,154 +1,154 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/Indexlist.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of the Indexlist class designed to manage index lists of
* constraints and bounds within a SubjectTo object.
*/
#ifndef QPOASES_INDEXLIST_HPP
#define QPOASES_INDEXLIST_HPP
#include <Utils.hpp>
/** This class manages index lists.
*
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*/
class Indexlist
{
/*
* PUBLIC MEMBER FUNCTIONS
*/
public:
/** Default constructor. */
Indexlist( );
/** Copy constructor (deep copy). */
Indexlist( const Indexlist& rhs /**< Rhs object. */
);
/** Destructor. */
~Indexlist( );
/** Assingment operator (deep copy). */
Indexlist& operator=( const Indexlist& rhs /**< Rhs object. */
);
/** Pseudo-constructor.
* \return SUCCESSFUL_RETURN */
returnValue init( );
/** Creates an array of all numbers within the index set in correct order.
* \return SUCCESSFUL_RETURN \n
RET_INDEXLIST_CORRUPTED */
returnValue getNumberArray( int* const numberarray /**< Output: Array of numbers (NULL on error). */
) const;
/** Determines the index within the index list at with a given number is stored.
* \return >= 0: Index of given number. \n
-1: Number not found. */
int getIndex( int givennumber /**< Number whose index shall be determined. */
) const;
/** Determines the physical index within the index list at with a given number is stored.
* \return >= 0: Index of given number. \n
-1: Number not found. */
int getPhysicalIndex( int givennumber /**< Number whose physical index shall be determined. */
) const;
/** Returns the number stored at a given physical index.
* \return >= 0: Number stored at given physical index. \n
-RET_INDEXLIST_OUTOFBOUNDS */
int getNumber( int physicalindex /**< Physical index of the number to be returned. */
) const;
/** Returns the current length of the index list.
* \return Current length of the index list. */
inline int getLength( );
/** Returns last number within the index list.
* \return Last number within the index list. */
inline int getLastNumber( ) const;
/** Adds number to index list.
* \return SUCCESSFUL_RETURN \n
RET_INDEXLIST_MUST_BE_REORDERD \n
RET_INDEXLIST_EXCEEDS_MAX_LENGTH */
returnValue addNumber( int addnumber /**< Number to be added. */
);
/** Removes number from index list.
* \return SUCCESSFUL_RETURN */
returnValue removeNumber( int removenumber /**< Number to be removed. */
);
/** Swaps two numbers within index list.
* \return SUCCESSFUL_RETURN */
returnValue swapNumbers( int number1,/**< First number for swapping. */
int number2 /**< Second number for swapping. */
);
/** Determines if a given number is contained in the index set.
* \return BT_TRUE iff number is contain in the index set */
inline BooleanType isMember( int _number /**< Number to be tested for membership. */
) const;
/*
* PROTECTED MEMBER VARIABLES
*/
protected:
int number[INDEXLISTFACTOR*(NVMAX+NCMAX)]; /**< Array to store numbers of constraints or bounds. */
int next[INDEXLISTFACTOR*(NVMAX+NCMAX)]; /**< Array to store physical index of successor. */
int previous[INDEXLISTFACTOR*(NVMAX+NCMAX)]; /**< Array to store physical index of predecossor. */
int length; /**< Length of index list. */
int first; /**< Physical index of first element. */
int last; /**< Physical index of last element. */
int lastusedindex; /**< Physical index of last entry in index list. */
int physicallength; /**< Physical length of index list. */
};
#include <Indexlist.ipp>
#endif /* QPOASES_INDEXLIST_HPP */
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/Indexlist.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of the Indexlist class designed to manage index lists of
* constraints and bounds within a SubjectTo object.
*/
#ifndef QPOASES_INDEXLIST_HPP
#define QPOASES_INDEXLIST_HPP
#include <Utils.hpp>
/** This class manages index lists.
*
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*/
class Indexlist
{
/*
* PUBLIC MEMBER FUNCTIONS
*/
public:
/** Default constructor. */
Indexlist( );
/** Copy constructor (deep copy). */
Indexlist( const Indexlist& rhs /**< Rhs object. */
);
/** Destructor. */
~Indexlist( );
/** Assingment operator (deep copy). */
Indexlist& operator=( const Indexlist& rhs /**< Rhs object. */
);
/** Pseudo-constructor.
* \return SUCCESSFUL_RETURN */
returnValue init( );
/** Creates an array of all numbers within the index set in correct order.
* \return SUCCESSFUL_RETURN \n
RET_INDEXLIST_CORRUPTED */
returnValue getNumberArray( int* const numberarray /**< Output: Array of numbers (NULL on error). */
) const;
/** Determines the index within the index list at with a given number is stored.
* \return >= 0: Index of given number. \n
-1: Number not found. */
int getIndex( int givennumber /**< Number whose index shall be determined. */
) const;
/** Determines the physical index within the index list at with a given number is stored.
* \return >= 0: Index of given number. \n
-1: Number not found. */
int getPhysicalIndex( int givennumber /**< Number whose physical index shall be determined. */
) const;
/** Returns the number stored at a given physical index.
* \return >= 0: Number stored at given physical index. \n
-RET_INDEXLIST_OUTOFBOUNDS */
int getNumber( int physicalindex /**< Physical index of the number to be returned. */
) const;
/** Returns the current length of the index list.
* \return Current length of the index list. */
inline int getLength( );
/** Returns last number within the index list.
* \return Last number within the index list. */
inline int getLastNumber( ) const;
/** Adds number to index list.
* \return SUCCESSFUL_RETURN \n
RET_INDEXLIST_MUST_BE_REORDERD \n
RET_INDEXLIST_EXCEEDS_MAX_LENGTH */
returnValue addNumber( int addnumber /**< Number to be added. */
);
/** Removes number from index list.
* \return SUCCESSFUL_RETURN */
returnValue removeNumber( int removenumber /**< Number to be removed. */
);
/** Swaps two numbers within index list.
* \return SUCCESSFUL_RETURN */
returnValue swapNumbers( int number1,/**< First number for swapping. */
int number2 /**< Second number for swapping. */
);
/** Determines if a given number is contained in the index set.
* \return BT_TRUE iff number is contain in the index set */
inline BooleanType isMember( int _number /**< Number to be tested for membership. */
) const;
/*
* PROTECTED MEMBER VARIABLES
*/
protected:
int number[INDEXLISTFACTOR*(NVMAX+NCMAX)]; /**< Array to store numbers of constraints or bounds. */
int next[INDEXLISTFACTOR*(NVMAX+NCMAX)]; /**< Array to store physical index of successor. */
int previous[INDEXLISTFACTOR*(NVMAX+NCMAX)]; /**< Array to store physical index of predecossor. */
int length; /**< Length of index list. */
int first; /**< Physical index of first element. */
int last; /**< Physical index of last element. */
int lastusedindex; /**< Physical index of last entry in index list. */
int physicallength; /**< Physical length of index list. */
};
#include <Indexlist.ipp>
#endif /* QPOASES_INDEXLIST_HPP */
/*
* end of file
*/
+415 -415
View File
@@ -1,415 +1,415 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/MessageHandling.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of the MessageHandling class including global return values.
*/
#ifndef QPOASES_MESSAGEHANDLING_HPP
#define QPOASES_MESSAGEHANDLING_HPP
// #define PC_DEBUG
#ifdef PC_DEBUG
#include <stdio.h>
/** Defines an alias for FILE from stdio.h. */
#define myFILE FILE
/** Defines an alias for stderr from stdio.h. */
#define myStderr stderr
/** Defines an alias for stdout from stdio.h. */
#define myStdout stdout
#else
/** Defines an alias for FILE from stdio.h. */
#define myFILE int
/** Defines an alias for stderr from stdio.h. */
#define myStderr 0
/** Defines an alias for stdout from stdio.h. */
#define myStdout 0
#endif
#include <Types.hpp>
#include <Constants.hpp>
/** Defines symbols for global return values. \n
* Important: All return values are assumed to be nonnegative! */
enum returnValue
{
TERMINAL_LIST_ELEMENT = -1, /**< Terminal list element, internal usage only! */
/* miscellaneous */
SUCCESSFUL_RETURN = 0, /**< Successful return. */
RET_DIV_BY_ZERO, /**< Division by zero. */
RET_INDEX_OUT_OF_BOUNDS, /**< Index out of bounds. */
RET_INVALID_ARGUMENTS, /**< At least one of the arguments is invalid. */
RET_ERROR_UNDEFINED, /**< Error number undefined. */
RET_WARNING_UNDEFINED, /**< Warning number undefined. */
RET_INFO_UNDEFINED, /**< Info number undefined. */
RET_EWI_UNDEFINED, /**< Error/warning/info number undefined. */
RET_AVAILABLE_WITH_LINUX_ONLY, /**< This function is available under Linux only. */
RET_UNKNOWN_BUG, /**< The error occured is not yet known. */
RET_PRINTLEVEL_CHANGED, /**< 10 Print level changed. */
RET_NOT_YET_IMPLEMENTED, /**< Requested function is not yet implemented in this version of qpOASES. */
/* Indexlist */
RET_INDEXLIST_MUST_BE_REORDERD, /**< Index list has to be reordered. */
RET_INDEXLIST_EXCEEDS_MAX_LENGTH, /**< Index list exceeds its maximal physical length. */
RET_INDEXLIST_CORRUPTED, /**< Index list corrupted. */
RET_INDEXLIST_OUTOFBOUNDS, /**< Physical index is out of bounds. */
RET_INDEXLIST_ADD_FAILED, /**< Adding indices from another index set failed. */
RET_INDEXLIST_INTERSECT_FAILED, /**< Intersection with another index set failed. */
/* SubjectTo / Bounds / Constraints */
RET_INDEX_ALREADY_OF_DESIRED_STATUS, /**< Index is already of desired status. */
RET_ADDINDEX_FAILED, /**< Cannot swap between different indexsets. */
RET_SWAPINDEX_FAILED, /**< 20 Adding index to index set failed. */
RET_NOTHING_TO_DO, /**< Nothing to do. */
RET_SETUP_BOUND_FAILED, /**< Setting up bound index failed. */
RET_SETUP_CONSTRAINT_FAILED, /**< Setting up constraint index failed. */
RET_MOVING_BOUND_FAILED, /**< Moving bound between index sets failed. */
RET_MOVING_CONSTRAINT_FAILED, /**< Moving constraint between index sets failed. */
/* QProblem */
RET_QP_ALREADY_INITIALISED, /**< QProblem has already been initialised. */
RET_NO_INIT_WITH_STANDARD_SOLVER, /**< Initialisation via extern QP solver is not yet implemented. */
RET_RESET_FAILED, /**< Reset failed. */
RET_INIT_FAILED, /**< Initialisation failed. */
RET_INIT_FAILED_TQ, /**< 30 Initialisation failed due to TQ factorisation. */
RET_INIT_FAILED_CHOLESKY, /**< Initialisation failed due to Cholesky decomposition. */
RET_INIT_FAILED_HOTSTART, /**< Initialisation failed! QP could not be solved! */
RET_INIT_FAILED_INFEASIBILITY, /**< Initial QP could not be solved due to infeasibility! */
RET_INIT_FAILED_UNBOUNDEDNESS, /**< Initial QP could not be solved due to unboundedness! */
RET_INIT_SUCCESSFUL, /**< Initialisation done. */
RET_OBTAINING_WORKINGSET_FAILED, /**< Failed to obtain working set for auxiliary QP. */
RET_SETUP_WORKINGSET_FAILED, /**< Failed to setup working set for auxiliary QP. */
RET_SETUP_AUXILIARYQP_FAILED, /**< Failed to setup auxiliary QP for initialised homotopy. */
RET_NO_EXTERN_SOLVER, /**< No extern QP solver available. */
RET_QP_UNBOUNDED, /**< 40 QP is unbounded. */
RET_QP_INFEASIBLE, /**< QP is infeasible. */
RET_QP_NOT_SOLVED, /**< Problems occured while solving QP with standard solver. */
RET_QP_SOLVED, /**< QP successfully solved. */
RET_UNABLE_TO_SOLVE_QP, /**< Problems occured while solving QP. */
RET_INITIALISATION_STARTED, /**< Starting problem initialisation. */
RET_HOTSTART_FAILED, /**< Unable to perform homotopy due to internal error. */
RET_HOTSTART_FAILED_TO_INIT, /**< Unable to initialise problem. */
RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED, /**< Unable to perform homotopy as previous QP is not solved. */
RET_ITERATION_STARTED, /**< Iteration... */
RET_SHIFT_DETERMINATION_FAILED, /**< 50 Determination of shift of the QP data failed. */
RET_STEPDIRECTION_DETERMINATION_FAILED, /**< Determination of step direction failed. */
RET_STEPLENGTH_DETERMINATION_FAILED, /**< Determination of step direction failed. */
RET_OPTIMAL_SOLUTION_FOUND, /**< Optimal solution of neighbouring QP found. */
RET_HOMOTOPY_STEP_FAILED, /**< Unable to perform homotopy step. */
RET_HOTSTART_STOPPED_INFEASIBILITY, /**< Premature homotopy termination because QP is infeasible. */
RET_HOTSTART_STOPPED_UNBOUNDEDNESS, /**< Premature homotopy termination because QP is unbounded. */
RET_WORKINGSET_UPDATE_FAILED, /**< Unable to update working sets according to initial guesses. */
RET_MAX_NWSR_REACHED, /**< Maximum number of working set recalculations performed. */
RET_CONSTRAINTS_NOT_SPECIFIED, /**< Problem does comprise constraints! You also have to specify new constraints' bounds. */
RET_INVALID_FACTORISATION_FLAG, /**< 60 Invalid factorisation flag. */
RET_UNABLE_TO_SAVE_QPDATA, /**< Unable to save QP data. */
RET_STEPDIRECTION_FAILED_TQ, /**< Abnormal termination due to TQ factorisation. */
RET_STEPDIRECTION_FAILED_CHOLESKY, /**< Abnormal termination due to Cholesky factorisation. */
RET_CYCLING_DETECTED, /**< Cycling detected. */
RET_CYCLING_NOT_RESOLVED, /**< Cycling cannot be resolved, QP probably infeasible. */
RET_CYCLING_RESOLVED, /**< Cycling probably resolved. */
RET_STEPSIZE, /**< For displaying performed stepsize. */
RET_STEPSIZE_NONPOSITIVE, /**< For displaying non-positive stepsize. */
RET_SETUPSUBJECTTOTYPE_FAILED, /**< Setup of SubjectToTypes failed. */
RET_ADDCONSTRAINT_FAILED, /**< 70 Addition of constraint to working set failed. */
RET_ADDCONSTRAINT_FAILED_INFEASIBILITY, /**< Addition of constraint to working set failed (due to QP infeasibility). */
RET_ADDBOUND_FAILED, /**< Addition of bound to working set failed. */
RET_ADDBOUND_FAILED_INFEASIBILITY, /**< Addition of bound to working set failed (due to QP infeasibility). */
RET_REMOVECONSTRAINT_FAILED, /**< Removal of constraint from working set failed. */
RET_REMOVEBOUND_FAILED, /**< Removal of bound from working set failed. */
RET_REMOVE_FROM_ACTIVESET, /**< Removing from active set... */
RET_ADD_TO_ACTIVESET, /**< Adding to active set... */
RET_REMOVE_FROM_ACTIVESET_FAILED, /**< Removing from active set failed. */
RET_ADD_TO_ACTIVESET_FAILED, /**< Adding to active set failed. */
RET_CONSTRAINT_ALREADY_ACTIVE, /**< 80 Constraint is already active. */
RET_ALL_CONSTRAINTS_ACTIVE, /**< All constraints are active, no further constraint can be added. */
RET_LINEARLY_DEPENDENT, /**< New bound/constraint is linearly dependent. */
RET_LINEARLY_INDEPENDENT, /**< New bound/constraint is linearly independent. */
RET_LI_RESOLVED, /**< Linear independence of active contraint matrix successfully resolved. */
RET_ENSURELI_FAILED, /**< Failed to ensure linear indepence of active contraint matrix. */
RET_ENSURELI_FAILED_TQ, /**< Abnormal termination due to TQ factorisation. */
RET_ENSURELI_FAILED_NOINDEX, /**< No index found, QP probably infeasible. */
RET_ENSURELI_FAILED_CYCLING, /**< Cycling detected, QP probably infeasible. */
RET_BOUND_ALREADY_ACTIVE, /**< Bound is already active. */
RET_ALL_BOUNDS_ACTIVE, /**< 90 All bounds are active, no further bound can be added. */
RET_CONSTRAINT_NOT_ACTIVE, /**< Constraint is not active. */
RET_BOUND_NOT_ACTIVE, /**< Bound is not active. */
RET_HESSIAN_NOT_SPD, /**< Projected Hessian matrix not positive definite. */
RET_MATRIX_SHIFT_FAILED, /**< Unable to update matrices or to transform vectors. */
RET_MATRIX_FACTORISATION_FAILED, /**< Unable to calculate new matrix factorisations. */
RET_PRINT_ITERATION_FAILED, /**< Unable to print information on current iteration. */
RET_NO_GLOBAL_MESSAGE_OUTPUTFILE, /**< No global message output file initialised. */
/* Utils */
RET_UNABLE_TO_OPEN_FILE, /**< Unable to open file. */
RET_UNABLE_TO_WRITE_FILE, /**< Unable to write into file. */
RET_UNABLE_TO_READ_FILE, /**< 100 Unable to read from file. */
RET_FILEDATA_INCONSISTENT, /**< File contains inconsistent data. */
/* SolutionAnalysis */
RET_NO_SOLUTION, /**< QP solution does not satisfy KKT optimality conditions. */
RET_INACCURATE_SOLUTION /**< KKT optimality conditions not satisfied to sufficient accuracy. */
};
/** This class handles all kinds of messages (errors, warnings, infos) initiated
* by qpOASES modules and stores the correspoding global preferences.
*
* \author Hans Joachim Ferreau (special thanks to Leonard Wirsching)
* \version 1.3embedded
* \date 2007-2008
*/
class MessageHandling
{
/*
* INTERNAL DATA STRUCTURES
*/
public:
/** Data structure for entries in global message list. */
typedef struct {
returnValue key; /**< Global return value. */
const char* data; /**< Corresponding message. */
VisibilityStatus globalVisibilityStatus; /**< Determines if message can be printed.
* If this value is set to VS_HIDDEN, no message is printed! */
} ReturnValueList;
/*
* PUBLIC MEMBER FUNCTIONS
*/
public:
/** Default constructor. */
MessageHandling( );
/** Constructor which takes the desired output file. */
MessageHandling( myFILE* _outputFile /**< Output file. */
);
/** Constructor which takes the desired visibility states. */
MessageHandling( VisibilityStatus _errorVisibility, /**< Visibility status for error messages. */
VisibilityStatus _warningVisibility,/**< Visibility status for warning messages. */
VisibilityStatus _infoVisibility /**< Visibility status for info messages. */
);
/** Constructor which takes the desired output file and desired visibility states. */
MessageHandling( myFILE* _outputFile, /**< Output file. */
VisibilityStatus _errorVisibility, /**< Visibility status for error messages. */
VisibilityStatus _warningVisibility,/**< Visibility status for warning messages. */
VisibilityStatus _infoVisibility /**< Visibility status for info messages. */
);
/** Copy constructor (deep copy). */
MessageHandling( const MessageHandling& rhs /**< Rhs object. */
);
/** Destructor. */
~MessageHandling( );
/** Assignment operator (deep copy). */
MessageHandling& operator=( const MessageHandling& rhs /**< Rhs object. */
);
/** Prints an error message(a simplified macro THROWERROR is also provided). \n
* Errors are definied as abnormal events which cause an immediate termination of the current (sub) function.
* Errors of a sub function should be commented by the calling function by means of a warning message
* (if this error does not cause an error of the calling function, either)!
* \return Error number returned by sub function call
*/
returnValue throwError(
returnValue Enumber, /**< Error number returned by sub function call. */
const char* additionaltext, /**< Additional error text (0, if none). */
const char* functionname, /**< Name of function which caused the error. */
const char* filename, /**< Name of file which caused the error. */
const unsigned long linenumber, /**< Number of line which caused the error.incompatible binary file */
VisibilityStatus localVisibilityStatus /**< Determines (locally) if error message can be printed to myStderr.
* If GLOBAL visibility status of the message is set to VS_HIDDEN,
* no message is printed, anyway! */
);
/** Prints a warning message (a simplified macro THROWWARNING is also provided).
* Warnings are definied as abnormal events which does NOT cause an immediate termination of the current (sub) function.
* \return Warning number returned by sub function call
*/
returnValue throwWarning(
returnValue Wnumber, /**< Warning number returned by sub function call. */
const char* additionaltext, /**< Additional warning text (0, if none). */
const char* functionname, /**< Name of function which caused the warning. */
const char* filename, /**< Name of file which caused the warning. */
const unsigned long linenumber, /**< Number of line which caused the warning. */
VisibilityStatus localVisibilityStatus /**< Determines (locally) if warning message can be printed to myStderr.
* If GLOBAL visibility status of the message is set to VS_HIDDEN,
* no message is printed, anyway! */
);
/** Prints a info message (a simplified macro THROWINFO is also provided).
* \return Info number returned by sub function call
*/
returnValue throwInfo(
returnValue Inumber, /**< Info number returned by sub function call. */
const char* additionaltext, /**< Additional warning text (0, if none). */
const char* functionname, /**< Name of function which submitted the info. */
const char* filename, /**< Name of file which submitted the info. */
const unsigned long linenumber, /**< Number of line which submitted the info. */
VisibilityStatus localVisibilityStatus /**< Determines (locally) if info message can be printed to myStderr.
* If GLOBAL visibility status of the message is set to VS_HIDDEN,
* no message is printed, anyway! */
);
/** Resets all preferences to default values.
* \return SUCCESSFUL_RETURN */
returnValue reset( );
/** Prints a complete list of all messages to output file.
* \return SUCCESSFUL_RETURN */
returnValue listAllMessages( );
/** Returns visibility status for error messages.
* \return Visibility status for error messages. */
inline VisibilityStatus getErrorVisibilityStatus( ) const;
/** Returns visibility status for warning messages.
* \return Visibility status for warning messages. */
inline VisibilityStatus getWarningVisibilityStatus( ) const;
/** Returns visibility status for info messages.
* \return Visibility status for info messages. */
inline VisibilityStatus getInfoVisibilityStatus( ) const;
/** Returns pointer to output file.
* \return Pointer to output file. */
inline myFILE* getOutputFile( ) const;
/** Returns error count value.
* \return Error count value. */
inline int getErrorCount( ) const;
/** Changes visibility status for error messages. */
inline void setErrorVisibilityStatus( VisibilityStatus _errorVisibility /**< New visibility status for error messages. */
);
/** Changes visibility status for warning messages. */
inline void setWarningVisibilityStatus( VisibilityStatus _warningVisibility /**< New visibility status for warning messages. */
);
/** Changes visibility status for info messages. */
inline void setInfoVisibilityStatus( VisibilityStatus _infoVisibility /**< New visibility status for info messages. */
);
/** Changes output file for messages. */
inline void setOutputFile( myFILE* _outputFile /**< New output file for messages. */
);
/** Changes error count.
* \return SUCCESSFUL_RETURN \n
* RET_INVALID_ARGUMENT */
inline returnValue setErrorCount( int _errorCount /**< New error count value. */
);
/** Return the error code string. */
static const char* getErrorString(int error);
/*
* PROTECTED MEMBER FUNCTIONS
*/
protected:
/** Prints a info message to myStderr (auxiliary function).
* \return Error/warning/info number returned by sub function call
*/
returnValue throwMessage(
returnValue RETnumber, /**< Error/warning/info number returned by sub function call. */
const char* additionaltext, /**< Additional warning text (0, if none). */
const char* functionname, /**< Name of function which caused the error/warning/info. */
const char* filename, /**< Name of file which caused the error/warning/info. */
const unsigned long linenumber, /**< Number of line which caused the error/warning/info. */
VisibilityStatus localVisibilityStatus, /**< Determines (locally) if info message can be printed to myStderr.
* If GLOBAL visibility status of the message is set to VS_HIDDEN,
* no message is printed, anyway! */
const char* RETstring /**< Leading string of error/warning/info message. */
);
/*
* PROTECTED MEMBER VARIABLES
*/
protected:
VisibilityStatus errorVisibility; /**< Error messages visible? */
VisibilityStatus warningVisibility; /**< Warning messages visible? */
VisibilityStatus infoVisibility; /**< Info messages visible? */
myFILE* outputFile; /**< Output file for messages. */
int errorCount; /**< Counts number of errors (for nicer output only). */
};
#ifndef __FUNCTION__
/** Ensures that __FUNCTION__ macro is defined. */
#define __FUNCTION__ 0
#endif
#ifndef __FILE__
/** Ensures that __FILE__ macro is defined. */
#define __FILE__ 0
#endif
#ifndef __LINE__
/** Ensures that __LINE__ macro is defined. */
#define __LINE__ 0
#endif
/** Short version of throwError with default values, only returnValue is needed */
#define THROWERROR(retval) ( getGlobalMessageHandler( )->throwError((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )
/** Short version of throwWarning with default values, only returnValue is needed */
#define THROWWARNING(retval) ( getGlobalMessageHandler( )->throwWarning((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )
/** Short version of throwInfo with default values, only returnValue is needed */
#define THROWINFO(retval) ( getGlobalMessageHandler( )->throwInfo((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )
/** Returns a pointer to global message handler.
* \return Pointer to global message handler.
*/
MessageHandling* getGlobalMessageHandler( );
#include <MessageHandling.ipp>
#endif /* QPOASES_MESSAGEHANDLING_HPP */
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/MessageHandling.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of the MessageHandling class including global return values.
*/
#ifndef QPOASES_MESSAGEHANDLING_HPP
#define QPOASES_MESSAGEHANDLING_HPP
// #define PC_DEBUG
#ifdef PC_DEBUG
#include <stdio.h>
/** Defines an alias for FILE from stdio.h. */
#define myFILE FILE
/** Defines an alias for stderr from stdio.h. */
#define myStderr stderr
/** Defines an alias for stdout from stdio.h. */
#define myStdout stdout
#else
/** Defines an alias for FILE from stdio.h. */
#define myFILE int
/** Defines an alias for stderr from stdio.h. */
#define myStderr 0
/** Defines an alias for stdout from stdio.h. */
#define myStdout 0
#endif
#include <Types.hpp>
#include <Constants.hpp>
/** Defines symbols for global return values. \n
* Important: All return values are assumed to be nonnegative! */
enum returnValue
{
TERMINAL_LIST_ELEMENT = -1, /**< Terminal list element, internal usage only! */
/* miscellaneous */
SUCCESSFUL_RETURN = 0, /**< Successful return. */
RET_DIV_BY_ZERO, /**< Division by zero. */
RET_INDEX_OUT_OF_BOUNDS, /**< Index out of bounds. */
RET_INVALID_ARGUMENTS, /**< At least one of the arguments is invalid. */
RET_ERROR_UNDEFINED, /**< Error number undefined. */
RET_WARNING_UNDEFINED, /**< Warning number undefined. */
RET_INFO_UNDEFINED, /**< Info number undefined. */
RET_EWI_UNDEFINED, /**< Error/warning/info number undefined. */
RET_AVAILABLE_WITH_LINUX_ONLY, /**< This function is available under Linux only. */
RET_UNKNOWN_BUG, /**< The error occured is not yet known. */
RET_PRINTLEVEL_CHANGED, /**< 10 Print level changed. */
RET_NOT_YET_IMPLEMENTED, /**< Requested function is not yet implemented in this version of qpOASES. */
/* Indexlist */
RET_INDEXLIST_MUST_BE_REORDERD, /**< Index list has to be reordered. */
RET_INDEXLIST_EXCEEDS_MAX_LENGTH, /**< Index list exceeds its maximal physical length. */
RET_INDEXLIST_CORRUPTED, /**< Index list corrupted. */
RET_INDEXLIST_OUTOFBOUNDS, /**< Physical index is out of bounds. */
RET_INDEXLIST_ADD_FAILED, /**< Adding indices from another index set failed. */
RET_INDEXLIST_INTERSECT_FAILED, /**< Intersection with another index set failed. */
/* SubjectTo / Bounds / Constraints */
RET_INDEX_ALREADY_OF_DESIRED_STATUS, /**< Index is already of desired status. */
RET_ADDINDEX_FAILED, /**< Cannot swap between different indexsets. */
RET_SWAPINDEX_FAILED, /**< 20 Adding index to index set failed. */
RET_NOTHING_TO_DO, /**< Nothing to do. */
RET_SETUP_BOUND_FAILED, /**< Setting up bound index failed. */
RET_SETUP_CONSTRAINT_FAILED, /**< Setting up constraint index failed. */
RET_MOVING_BOUND_FAILED, /**< Moving bound between index sets failed. */
RET_MOVING_CONSTRAINT_FAILED, /**< Moving constraint between index sets failed. */
/* QProblem */
RET_QP_ALREADY_INITIALISED, /**< QProblem has already been initialised. */
RET_NO_INIT_WITH_STANDARD_SOLVER, /**< Initialisation via extern QP solver is not yet implemented. */
RET_RESET_FAILED, /**< Reset failed. */
RET_INIT_FAILED, /**< Initialisation failed. */
RET_INIT_FAILED_TQ, /**< 30 Initialisation failed due to TQ factorisation. */
RET_INIT_FAILED_CHOLESKY, /**< Initialisation failed due to Cholesky decomposition. */
RET_INIT_FAILED_HOTSTART, /**< Initialisation failed! QP could not be solved! */
RET_INIT_FAILED_INFEASIBILITY, /**< Initial QP could not be solved due to infeasibility! */
RET_INIT_FAILED_UNBOUNDEDNESS, /**< Initial QP could not be solved due to unboundedness! */
RET_INIT_SUCCESSFUL, /**< Initialisation done. */
RET_OBTAINING_WORKINGSET_FAILED, /**< Failed to obtain working set for auxiliary QP. */
RET_SETUP_WORKINGSET_FAILED, /**< Failed to setup working set for auxiliary QP. */
RET_SETUP_AUXILIARYQP_FAILED, /**< Failed to setup auxiliary QP for initialised homotopy. */
RET_NO_EXTERN_SOLVER, /**< No extern QP solver available. */
RET_QP_UNBOUNDED, /**< 40 QP is unbounded. */
RET_QP_INFEASIBLE, /**< QP is infeasible. */
RET_QP_NOT_SOLVED, /**< Problems occured while solving QP with standard solver. */
RET_QP_SOLVED, /**< QP successfully solved. */
RET_UNABLE_TO_SOLVE_QP, /**< Problems occured while solving QP. */
RET_INITIALISATION_STARTED, /**< Starting problem initialisation. */
RET_HOTSTART_FAILED, /**< Unable to perform homotopy due to internal error. */
RET_HOTSTART_FAILED_TO_INIT, /**< Unable to initialise problem. */
RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED, /**< Unable to perform homotopy as previous QP is not solved. */
RET_ITERATION_STARTED, /**< Iteration... */
RET_SHIFT_DETERMINATION_FAILED, /**< 50 Determination of shift of the QP data failed. */
RET_STEPDIRECTION_DETERMINATION_FAILED, /**< Determination of step direction failed. */
RET_STEPLENGTH_DETERMINATION_FAILED, /**< Determination of step direction failed. */
RET_OPTIMAL_SOLUTION_FOUND, /**< Optimal solution of neighbouring QP found. */
RET_HOMOTOPY_STEP_FAILED, /**< Unable to perform homotopy step. */
RET_HOTSTART_STOPPED_INFEASIBILITY, /**< Premature homotopy termination because QP is infeasible. */
RET_HOTSTART_STOPPED_UNBOUNDEDNESS, /**< Premature homotopy termination because QP is unbounded. */
RET_WORKINGSET_UPDATE_FAILED, /**< Unable to update working sets according to initial guesses. */
RET_MAX_NWSR_REACHED, /**< Maximum number of working set recalculations performed. */
RET_CONSTRAINTS_NOT_SPECIFIED, /**< Problem does comprise constraints! You also have to specify new constraints' bounds. */
RET_INVALID_FACTORISATION_FLAG, /**< 60 Invalid factorisation flag. */
RET_UNABLE_TO_SAVE_QPDATA, /**< Unable to save QP data. */
RET_STEPDIRECTION_FAILED_TQ, /**< Abnormal termination due to TQ factorisation. */
RET_STEPDIRECTION_FAILED_CHOLESKY, /**< Abnormal termination due to Cholesky factorisation. */
RET_CYCLING_DETECTED, /**< Cycling detected. */
RET_CYCLING_NOT_RESOLVED, /**< Cycling cannot be resolved, QP probably infeasible. */
RET_CYCLING_RESOLVED, /**< Cycling probably resolved. */
RET_STEPSIZE, /**< For displaying performed stepsize. */
RET_STEPSIZE_NONPOSITIVE, /**< For displaying non-positive stepsize. */
RET_SETUPSUBJECTTOTYPE_FAILED, /**< Setup of SubjectToTypes failed. */
RET_ADDCONSTRAINT_FAILED, /**< 70 Addition of constraint to working set failed. */
RET_ADDCONSTRAINT_FAILED_INFEASIBILITY, /**< Addition of constraint to working set failed (due to QP infeasibility). */
RET_ADDBOUND_FAILED, /**< Addition of bound to working set failed. */
RET_ADDBOUND_FAILED_INFEASIBILITY, /**< Addition of bound to working set failed (due to QP infeasibility). */
RET_REMOVECONSTRAINT_FAILED, /**< Removal of constraint from working set failed. */
RET_REMOVEBOUND_FAILED, /**< Removal of bound from working set failed. */
RET_REMOVE_FROM_ACTIVESET, /**< Removing from active set... */
RET_ADD_TO_ACTIVESET, /**< Adding to active set... */
RET_REMOVE_FROM_ACTIVESET_FAILED, /**< Removing from active set failed. */
RET_ADD_TO_ACTIVESET_FAILED, /**< Adding to active set failed. */
RET_CONSTRAINT_ALREADY_ACTIVE, /**< 80 Constraint is already active. */
RET_ALL_CONSTRAINTS_ACTIVE, /**< All constraints are active, no further constraint can be added. */
RET_LINEARLY_DEPENDENT, /**< New bound/constraint is linearly dependent. */
RET_LINEARLY_INDEPENDENT, /**< New bound/constraint is linearly independent. */
RET_LI_RESOLVED, /**< Linear independence of active contraint matrix successfully resolved. */
RET_ENSURELI_FAILED, /**< Failed to ensure linear indepence of active contraint matrix. */
RET_ENSURELI_FAILED_TQ, /**< Abnormal termination due to TQ factorisation. */
RET_ENSURELI_FAILED_NOINDEX, /**< No index found, QP probably infeasible. */
RET_ENSURELI_FAILED_CYCLING, /**< Cycling detected, QP probably infeasible. */
RET_BOUND_ALREADY_ACTIVE, /**< Bound is already active. */
RET_ALL_BOUNDS_ACTIVE, /**< 90 All bounds are active, no further bound can be added. */
RET_CONSTRAINT_NOT_ACTIVE, /**< Constraint is not active. */
RET_BOUND_NOT_ACTIVE, /**< Bound is not active. */
RET_HESSIAN_NOT_SPD, /**< Projected Hessian matrix not positive definite. */
RET_MATRIX_SHIFT_FAILED, /**< Unable to update matrices or to transform vectors. */
RET_MATRIX_FACTORISATION_FAILED, /**< Unable to calculate new matrix factorisations. */
RET_PRINT_ITERATION_FAILED, /**< Unable to print information on current iteration. */
RET_NO_GLOBAL_MESSAGE_OUTPUTFILE, /**< No global message output file initialised. */
/* Utils */
RET_UNABLE_TO_OPEN_FILE, /**< Unable to open file. */
RET_UNABLE_TO_WRITE_FILE, /**< Unable to write into file. */
RET_UNABLE_TO_READ_FILE, /**< 100 Unable to read from file. */
RET_FILEDATA_INCONSISTENT, /**< File contains inconsistent data. */
/* SolutionAnalysis */
RET_NO_SOLUTION, /**< QP solution does not satisfy KKT optimality conditions. */
RET_INACCURATE_SOLUTION /**< KKT optimality conditions not satisfied to sufficient accuracy. */
};
/** This class handles all kinds of messages (errors, warnings, infos) initiated
* by qpOASES modules and stores the correspoding global preferences.
*
* \author Hans Joachim Ferreau (special thanks to Leonard Wirsching)
* \version 1.3embedded
* \date 2007-2008
*/
class MessageHandling
{
/*
* INTERNAL DATA STRUCTURES
*/
public:
/** Data structure for entries in global message list. */
typedef struct {
returnValue key; /**< Global return value. */
const char* data; /**< Corresponding message. */
VisibilityStatus globalVisibilityStatus; /**< Determines if message can be printed.
* If this value is set to VS_HIDDEN, no message is printed! */
} ReturnValueList;
/*
* PUBLIC MEMBER FUNCTIONS
*/
public:
/** Default constructor. */
MessageHandling( );
/** Constructor which takes the desired output file. */
MessageHandling( myFILE* _outputFile /**< Output file. */
);
/** Constructor which takes the desired visibility states. */
MessageHandling( VisibilityStatus _errorVisibility, /**< Visibility status for error messages. */
VisibilityStatus _warningVisibility,/**< Visibility status for warning messages. */
VisibilityStatus _infoVisibility /**< Visibility status for info messages. */
);
/** Constructor which takes the desired output file and desired visibility states. */
MessageHandling( myFILE* _outputFile, /**< Output file. */
VisibilityStatus _errorVisibility, /**< Visibility status for error messages. */
VisibilityStatus _warningVisibility,/**< Visibility status for warning messages. */
VisibilityStatus _infoVisibility /**< Visibility status for info messages. */
);
/** Copy constructor (deep copy). */
MessageHandling( const MessageHandling& rhs /**< Rhs object. */
);
/** Destructor. */
~MessageHandling( );
/** Assignment operator (deep copy). */
MessageHandling& operator=( const MessageHandling& rhs /**< Rhs object. */
);
/** Prints an error message(a simplified macro THROWERROR is also provided). \n
* Errors are definied as abnormal events which cause an immediate termination of the current (sub) function.
* Errors of a sub function should be commented by the calling function by means of a warning message
* (if this error does not cause an error of the calling function, either)!
* \return Error number returned by sub function call
*/
returnValue throwError(
returnValue Enumber, /**< Error number returned by sub function call. */
const char* additionaltext, /**< Additional error text (0, if none). */
const char* functionname, /**< Name of function which caused the error. */
const char* filename, /**< Name of file which caused the error. */
const unsigned long linenumber, /**< Number of line which caused the error.incompatible binary file */
VisibilityStatus localVisibilityStatus /**< Determines (locally) if error message can be printed to myStderr.
* If GLOBAL visibility status of the message is set to VS_HIDDEN,
* no message is printed, anyway! */
);
/** Prints a warning message (a simplified macro THROWWARNING is also provided).
* Warnings are definied as abnormal events which does NOT cause an immediate termination of the current (sub) function.
* \return Warning number returned by sub function call
*/
returnValue throwWarning(
returnValue Wnumber, /**< Warning number returned by sub function call. */
const char* additionaltext, /**< Additional warning text (0, if none). */
const char* functionname, /**< Name of function which caused the warning. */
const char* filename, /**< Name of file which caused the warning. */
const unsigned long linenumber, /**< Number of line which caused the warning. */
VisibilityStatus localVisibilityStatus /**< Determines (locally) if warning message can be printed to myStderr.
* If GLOBAL visibility status of the message is set to VS_HIDDEN,
* no message is printed, anyway! */
);
/** Prints a info message (a simplified macro THROWINFO is also provided).
* \return Info number returned by sub function call
*/
returnValue throwInfo(
returnValue Inumber, /**< Info number returned by sub function call. */
const char* additionaltext, /**< Additional warning text (0, if none). */
const char* functionname, /**< Name of function which submitted the info. */
const char* filename, /**< Name of file which submitted the info. */
const unsigned long linenumber, /**< Number of line which submitted the info. */
VisibilityStatus localVisibilityStatus /**< Determines (locally) if info message can be printed to myStderr.
* If GLOBAL visibility status of the message is set to VS_HIDDEN,
* no message is printed, anyway! */
);
/** Resets all preferences to default values.
* \return SUCCESSFUL_RETURN */
returnValue reset( );
/** Prints a complete list of all messages to output file.
* \return SUCCESSFUL_RETURN */
returnValue listAllMessages( );
/** Returns visibility status for error messages.
* \return Visibility status for error messages. */
inline VisibilityStatus getErrorVisibilityStatus( ) const;
/** Returns visibility status for warning messages.
* \return Visibility status for warning messages. */
inline VisibilityStatus getWarningVisibilityStatus( ) const;
/** Returns visibility status for info messages.
* \return Visibility status for info messages. */
inline VisibilityStatus getInfoVisibilityStatus( ) const;
/** Returns pointer to output file.
* \return Pointer to output file. */
inline myFILE* getOutputFile( ) const;
/** Returns error count value.
* \return Error count value. */
inline int getErrorCount( ) const;
/** Changes visibility status for error messages. */
inline void setErrorVisibilityStatus( VisibilityStatus _errorVisibility /**< New visibility status for error messages. */
);
/** Changes visibility status for warning messages. */
inline void setWarningVisibilityStatus( VisibilityStatus _warningVisibility /**< New visibility status for warning messages. */
);
/** Changes visibility status for info messages. */
inline void setInfoVisibilityStatus( VisibilityStatus _infoVisibility /**< New visibility status for info messages. */
);
/** Changes output file for messages. */
inline void setOutputFile( myFILE* _outputFile /**< New output file for messages. */
);
/** Changes error count.
* \return SUCCESSFUL_RETURN \n
* RET_INVALID_ARGUMENT */
inline returnValue setErrorCount( int _errorCount /**< New error count value. */
);
/** Return the error code string. */
static const char* getErrorString(int error);
/*
* PROTECTED MEMBER FUNCTIONS
*/
protected:
/** Prints a info message to myStderr (auxiliary function).
* \return Error/warning/info number returned by sub function call
*/
returnValue throwMessage(
returnValue RETnumber, /**< Error/warning/info number returned by sub function call. */
const char* additionaltext, /**< Additional warning text (0, if none). */
const char* functionname, /**< Name of function which caused the error/warning/info. */
const char* filename, /**< Name of file which caused the error/warning/info. */
const unsigned long linenumber, /**< Number of line which caused the error/warning/info. */
VisibilityStatus localVisibilityStatus, /**< Determines (locally) if info message can be printed to myStderr.
* If GLOBAL visibility status of the message is set to VS_HIDDEN,
* no message is printed, anyway! */
const char* RETstring /**< Leading string of error/warning/info message. */
);
/*
* PROTECTED MEMBER VARIABLES
*/
protected:
VisibilityStatus errorVisibility; /**< Error messages visible? */
VisibilityStatus warningVisibility; /**< Warning messages visible? */
VisibilityStatus infoVisibility; /**< Info messages visible? */
myFILE* outputFile; /**< Output file for messages. */
int errorCount; /**< Counts number of errors (for nicer output only). */
};
#ifndef __FUNCTION__
/** Ensures that __FUNCTION__ macro is defined. */
#define __FUNCTION__ 0
#endif
#ifndef __FILE__
/** Ensures that __FILE__ macro is defined. */
#define __FILE__ 0
#endif
#ifndef __LINE__
/** Ensures that __LINE__ macro is defined. */
#define __LINE__ 0
#endif
/** Short version of throwError with default values, only returnValue is needed */
#define THROWERROR(retval) ( getGlobalMessageHandler( )->throwError((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )
/** Short version of throwWarning with default values, only returnValue is needed */
#define THROWWARNING(retval) ( getGlobalMessageHandler( )->throwWarning((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )
/** Short version of throwInfo with default values, only returnValue is needed */
#define THROWINFO(retval) ( getGlobalMessageHandler( )->throwInfo((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )
/** Returns a pointer to global message handler.
* \return Pointer to global message handler.
*/
MessageHandling* getGlobalMessageHandler( );
#include <MessageHandling.ipp>
#endif /* QPOASES_MESSAGEHANDLING_HPP */
/*
* end of file
*/
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+178 -178
View File
@@ -1,178 +1,178 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/SubjectTo.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of the SubjectTo class designed to manage working sets of
* constraints and bounds within a QProblem.
*/
#ifndef QPOASES_SUBJECTTO_HPP
#define QPOASES_SUBJECTTO_HPP
#include <Indexlist.hpp>
/** This class manages working sets of constraints and bounds by storing
* index sets and other status information.
*
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*/
class SubjectTo
{
/*
* PUBLIC MEMBER FUNCTIONS
*/
public:
/** Default constructor. */
SubjectTo( );
/** Copy constructor (deep copy). */
SubjectTo( const SubjectTo& rhs /**< Rhs object. */
);
/** Destructor. */
~SubjectTo( );
/** Assignment operator (deep copy). */
SubjectTo& operator=( const SubjectTo& rhs /**< Rhs object. */
);
/** Pseudo-constructor takes the number of constraints or bounds.
* \return SUCCESSFUL_RETURN */
returnValue init( int n /**< Number of constraints or bounds. */
);
/** Returns type of (constraints') bound.
* \return Type of (constraints') bound \n
RET_INDEX_OUT_OF_BOUNDS */
inline SubjectToType getType( int i /**< Number of (constraints') bound. */
) const ;
/** Returns status of (constraints') bound.
* \return Status of (constraints') bound \n
ST_UNDEFINED */
inline SubjectToStatus getStatus( int i /**< Number of (constraints') bound. */
) const;
/** Sets type of (constraints') bound.
* \return SUCCESSFUL_RETURN \n
RET_INDEX_OUT_OF_BOUNDS */
inline returnValue setType( int i, /**< Number of (constraints') bound. */
SubjectToType value /**< Type of (constraints') bound. */
);
/** Sets status of (constraints') bound.
* \return SUCCESSFUL_RETURN \n
RET_INDEX_OUT_OF_BOUNDS */
inline returnValue setStatus( int i, /**< Number of (constraints') bound. */
SubjectToStatus value /**< Status of (constraints') bound. */
);
/** Sets status of lower (constraints') bounds. */
inline void setNoLower( BooleanType _status /**< Status of lower (constraints') bounds. */
);
/** Sets status of upper (constraints') bounds. */
inline void setNoUpper( BooleanType _status /**< Status of upper (constraints') bounds. */
);
/** Returns status of lower (constraints') bounds.
* \return BT_TRUE if there is no lower (constraints') bound on any variable. */
inline BooleanType isNoLower( ) const;
/** Returns status of upper bounds.
* \return BT_TRUE if there is no upper (constraints') bound on any variable. */
inline BooleanType isNoUpper( ) const;
/*
* PROTECTED MEMBER FUNCTIONS
*/
protected:
/** Adds the index of a new constraint or bound to index set.
* \return SUCCESSFUL_RETURN \n
RET_ADDINDEX_FAILED */
returnValue addIndex( Indexlist* const indexlist, /**< Index list to which the new index shall be added. */
int newnumber, /**< Number of new constraint or bound. */
SubjectToStatus newstatus /**< Status of new constraint or bound. */
);
/** Removes the index of a constraint or bound from index set.
* \return SUCCESSFUL_RETURN \n
RET_UNKNOWN_BUG */
returnValue removeIndex( Indexlist* const indexlist, /**< Index list from which the new index shall be removed. */
int removenumber /**< Number of constraint or bound to be removed. */
);
/** Swaps the indices of two constraints or bounds within the index set.
* \return SUCCESSFUL_RETURN \n
RET_SWAPINDEX_FAILED */
returnValue swapIndex( Indexlist* const indexlist, /**< Index list in which the indices shold be swapped. */
int number1, /**< Number of first constraint or bound. */
int number2 /**< Number of second constraint or bound. */
);
/*
* PROTECTED MEMBER VARIABLES
*/
protected:
SubjectToType type[NVMAX+NCMAX]; /**< Type of constraints/bounds. */
SubjectToStatus status[NVMAX+NCMAX]; /**< Status of constraints/bounds. */
BooleanType noLower; /**< This flag indicates if there is no lower bound on any variable. */
BooleanType noUpper; /**< This flag indicates if there is no upper bound on any variable. */
/*
* PRIVATE MEMBER VARIABLES
*/
private:
int size;
};
#include <SubjectTo.ipp>
#endif /* QPOASES_SUBJECTTO_HPP */
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/SubjectTo.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of the SubjectTo class designed to manage working sets of
* constraints and bounds within a QProblem.
*/
#ifndef QPOASES_SUBJECTTO_HPP
#define QPOASES_SUBJECTTO_HPP
#include <Indexlist.hpp>
/** This class manages working sets of constraints and bounds by storing
* index sets and other status information.
*
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*/
class SubjectTo
{
/*
* PUBLIC MEMBER FUNCTIONS
*/
public:
/** Default constructor. */
SubjectTo( );
/** Copy constructor (deep copy). */
SubjectTo( const SubjectTo& rhs /**< Rhs object. */
);
/** Destructor. */
~SubjectTo( );
/** Assignment operator (deep copy). */
SubjectTo& operator=( const SubjectTo& rhs /**< Rhs object. */
);
/** Pseudo-constructor takes the number of constraints or bounds.
* \return SUCCESSFUL_RETURN */
returnValue init( int n /**< Number of constraints or bounds. */
);
/** Returns type of (constraints') bound.
* \return Type of (constraints') bound \n
RET_INDEX_OUT_OF_BOUNDS */
inline SubjectToType getType( int i /**< Number of (constraints') bound. */
) const ;
/** Returns status of (constraints') bound.
* \return Status of (constraints') bound \n
ST_UNDEFINED */
inline SubjectToStatus getStatus( int i /**< Number of (constraints') bound. */
) const;
/** Sets type of (constraints') bound.
* \return SUCCESSFUL_RETURN \n
RET_INDEX_OUT_OF_BOUNDS */
inline returnValue setType( int i, /**< Number of (constraints') bound. */
SubjectToType value /**< Type of (constraints') bound. */
);
/** Sets status of (constraints') bound.
* \return SUCCESSFUL_RETURN \n
RET_INDEX_OUT_OF_BOUNDS */
inline returnValue setStatus( int i, /**< Number of (constraints') bound. */
SubjectToStatus value /**< Status of (constraints') bound. */
);
/** Sets status of lower (constraints') bounds. */
inline void setNoLower( BooleanType _status /**< Status of lower (constraints') bounds. */
);
/** Sets status of upper (constraints') bounds. */
inline void setNoUpper( BooleanType _status /**< Status of upper (constraints') bounds. */
);
/** Returns status of lower (constraints') bounds.
* \return BT_TRUE if there is no lower (constraints') bound on any variable. */
inline BooleanType isNoLower( ) const;
/** Returns status of upper bounds.
* \return BT_TRUE if there is no upper (constraints') bound on any variable. */
inline BooleanType isNoUpper( ) const;
/*
* PROTECTED MEMBER FUNCTIONS
*/
protected:
/** Adds the index of a new constraint or bound to index set.
* \return SUCCESSFUL_RETURN \n
RET_ADDINDEX_FAILED */
returnValue addIndex( Indexlist* const indexlist, /**< Index list to which the new index shall be added. */
int newnumber, /**< Number of new constraint or bound. */
SubjectToStatus newstatus /**< Status of new constraint or bound. */
);
/** Removes the index of a constraint or bound from index set.
* \return SUCCESSFUL_RETURN \n
RET_UNKNOWN_BUG */
returnValue removeIndex( Indexlist* const indexlist, /**< Index list from which the new index shall be removed. */
int removenumber /**< Number of constraint or bound to be removed. */
);
/** Swaps the indices of two constraints or bounds within the index set.
* \return SUCCESSFUL_RETURN \n
RET_SWAPINDEX_FAILED */
returnValue swapIndex( Indexlist* const indexlist, /**< Index list in which the indices shold be swapped. */
int number1, /**< Number of first constraint or bound. */
int number2 /**< Number of second constraint or bound. */
);
/*
* PROTECTED MEMBER VARIABLES
*/
protected:
SubjectToType type[NVMAX+NCMAX]; /**< Type of constraints/bounds. */
SubjectToStatus status[NVMAX+NCMAX]; /**< Status of constraints/bounds. */
BooleanType noLower; /**< This flag indicates if there is no lower bound on any variable. */
BooleanType noUpper; /**< This flag indicates if there is no upper bound on any variable. */
/*
* PRIVATE MEMBER VARIABLES
*/
private:
int size;
};
#include <SubjectTo.ipp>
#endif /* QPOASES_SUBJECTTO_HPP */
/*
* end of file
*/
+131 -131
View File
@@ -1,131 +1,131 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/Types.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2008
*
* Declaration of all non-built-in types (except for classes).
*/
#ifndef QPOASES_TYPES_HPP
#define QPOASES_TYPES_HPP
/** Define real_t for facilitating switching between double and float. */
// typedef double real_t;
/** Summarises all possible logical values. */
enum BooleanType
{
BT_FALSE, /**< Logical value for "false". */
BT_TRUE /**< Logical value for "true". */
};
/** Summarises all possible print levels. Print levels are used to describe
* the desired amount of output during runtime of qpOASES. */
enum PrintLevel
{
PL_NONE, /**< No output. */
PL_LOW, /**< Print error messages only. */
PL_MEDIUM, /**< Print error and warning messages as well as concise info messages. */
PL_HIGH /**< Print all messages with full details. */
};
/** Defines visibility status of a message. */
enum VisibilityStatus
{
VS_VISIBLE, /**< Message visible. */
VS_HIDDEN /**< Message not visible. */
};
/** Summarises all possible states of the (S)QProblem(B) object during the
solution process of a QP sequence. */
enum QProblemStatus
{
QPS_NOTINITIALISED, /**< QProblem object is freshly instantiated or reset. */
QPS_PREPARINGAUXILIARYQP, /**< An auxiliary problem is currently setup, either at the very beginning
* via an initial homotopy or after changing the QP matrices. */
QPS_AUXILIARYQPSOLVED, /**< An auxilary problem was solved, either at the very beginning
* via an initial homotopy or after changing the QP matrices. */
QPS_PERFORMINGHOMOTOPY, /**< A homotopy according to the main idea of the online active
* set strategy is performed. */
QPS_HOMOTOPYQPSOLVED, /**< An intermediate QP along the homotopy path was solved. */
QPS_SOLVED /**< The solution of the actual QP was found. */
};
/** Summarises all possible types of bounds and constraints. */
enum SubjectToType
{
ST_UNBOUNDED, /**< Bound/constraint is unbounded. */
ST_BOUNDED, /**< Bound/constraint is bounded but not fixed. */
ST_EQUALITY, /**< Bound/constraint is fixed (implicit equality bound/constraint). */
ST_UNKNOWN /**< Type of bound/constraint unknown. */
};
/** Summarises all possible states of bounds and constraints. */
enum SubjectToStatus
{
ST_INACTIVE, /**< Bound/constraint is inactive. */
ST_LOWER, /**< Bound/constraint is at its lower bound. */
ST_UPPER, /**< Bound/constraint is at its upper bound. */
ST_UNDEFINED /**< Status of bound/constraint undefined. */
};
/** Summarises all possible cycling states of bounds and constraints. */
enum CyclingStatus
{
CYC_NOT_INVOLVED, /**< Bound/constraint is not involved in current cycling. */
CYC_PREV_ADDED, /**< Bound/constraint has previously been added during the current cycling. */
CYC_PREV_REMOVED /**< Bound/constraint has previously been removed during the current cycling. */
};
/** Summarises all possible types of the QP's Hessian matrix. */
enum HessianType
{
HST_SEMIDEF, /**< Hessian is positive semi-definite. */
HST_POSDEF_NULLSPACE, /**< Hessian is positive definite on null space of active bounds/constraints. */
HST_POSDEF, /**< Hessian is (strictly) positive definite. */
HST_IDENTITY /**< Hessian is identity matrix. */
};
#endif /* QPOASES_TYPES_HPP */
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/Types.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2008
*
* Declaration of all non-built-in types (except for classes).
*/
#ifndef QPOASES_TYPES_HPP
#define QPOASES_TYPES_HPP
/** Define real_t for facilitating switching between double and float. */
// typedef double real_t;
/** Summarises all possible logical values. */
enum BooleanType
{
BT_FALSE, /**< Logical value for "false". */
BT_TRUE /**< Logical value for "true". */
};
/** Summarises all possible print levels. Print levels are used to describe
* the desired amount of output during runtime of qpOASES. */
enum PrintLevel
{
PL_NONE, /**< No output. */
PL_LOW, /**< Print error messages only. */
PL_MEDIUM, /**< Print error and warning messages as well as concise info messages. */
PL_HIGH /**< Print all messages with full details. */
};
/** Defines visibility status of a message. */
enum VisibilityStatus
{
VS_VISIBLE, /**< Message visible. */
VS_HIDDEN /**< Message not visible. */
};
/** Summarises all possible states of the (S)QProblem(B) object during the
solution process of a QP sequence. */
enum QProblemStatus
{
QPS_NOTINITIALISED, /**< QProblem object is freshly instantiated or reset. */
QPS_PREPARINGAUXILIARYQP, /**< An auxiliary problem is currently setup, either at the very beginning
* via an initial homotopy or after changing the QP matrices. */
QPS_AUXILIARYQPSOLVED, /**< An auxilary problem was solved, either at the very beginning
* via an initial homotopy or after changing the QP matrices. */
QPS_PERFORMINGHOMOTOPY, /**< A homotopy according to the main idea of the online active
* set strategy is performed. */
QPS_HOMOTOPYQPSOLVED, /**< An intermediate QP along the homotopy path was solved. */
QPS_SOLVED /**< The solution of the actual QP was found. */
};
/** Summarises all possible types of bounds and constraints. */
enum SubjectToType
{
ST_UNBOUNDED, /**< Bound/constraint is unbounded. */
ST_BOUNDED, /**< Bound/constraint is bounded but not fixed. */
ST_EQUALITY, /**< Bound/constraint is fixed (implicit equality bound/constraint). */
ST_UNKNOWN /**< Type of bound/constraint unknown. */
};
/** Summarises all possible states of bounds and constraints. */
enum SubjectToStatus
{
ST_INACTIVE, /**< Bound/constraint is inactive. */
ST_LOWER, /**< Bound/constraint is at its lower bound. */
ST_UPPER, /**< Bound/constraint is at its upper bound. */
ST_UNDEFINED /**< Status of bound/constraint undefined. */
};
/** Summarises all possible cycling states of bounds and constraints. */
enum CyclingStatus
{
CYC_NOT_INVOLVED, /**< Bound/constraint is not involved in current cycling. */
CYC_PREV_ADDED, /**< Bound/constraint has previously been added during the current cycling. */
CYC_PREV_REMOVED /**< Bound/constraint has previously been removed during the current cycling. */
};
/** Summarises all possible types of the QP's Hessian matrix. */
enum HessianType
{
HST_SEMIDEF, /**< Hessian is positive semi-definite. */
HST_POSDEF_NULLSPACE, /**< Hessian is positive definite on null space of active bounds/constraints. */
HST_POSDEF, /**< Hessian is (strictly) positive definite. */
HST_IDENTITY /**< Hessian is identity matrix. */
};
#endif /* QPOASES_TYPES_HPP */
/*
* end of file
*/
+197 -197
View File
@@ -1,197 +1,197 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/Utils.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of global utility functions for working with qpOASES.
*/
#ifndef QPOASES_UTILS_HPP
#define QPOASES_UTILS_HPP
#include <MessageHandling.hpp>
#ifdef PC_DEBUG /* Define print functions only for debugging! */
/** Prints a vector.
* \return SUCCESSFUL_RETURN */
returnValue print( const real_t* const v, /**< Vector to be printed. */
int n /**< Length of vector. */
);
/** Prints a permuted vector.
* \return SUCCESSFUL_RETURN */
returnValue print( const real_t* const v, /**< Vector to be printed. */
int n, /**< Length of vector. */
const int* const V_idx /**< Pemutation vector. */
);
/** Prints a named vector.
* \return SUCCESSFUL_RETURN */
returnValue print( const real_t* const v, /**< Vector to be printed. */
int n, /**< Length of vector. */
const char* name /** Name of vector. */
);
/** Prints a matrix.
* \return SUCCESSFUL_RETURN */
returnValue print( const real_t* const M, /**< Matrix to be printed. */
int nrow, /**< Row number of matrix. */
int ncol /**< Column number of matrix. */
);
/** Prints a permuted matrix.
* \return SUCCESSFUL_RETURN */
returnValue print( const real_t* const M, /**< Matrix to be printed. */
int nrow, /**< Row number of matrix. */
int ncol , /**< Column number of matrix. */
const int* const ROW_idx, /**< Row pemutation vector. */
const int* const COL_idx /**< Column pemutation vector. */
);
/** Prints a named matrix.
* \return SUCCESSFUL_RETURN */
returnValue print( const real_t* const M, /**< Matrix to be printed. */
int nrow, /**< Row number of matrix. */
int ncol, /**< Column number of matrix. */
const char* name /** Name of matrix. */
);
/** Prints an index array.
* \return SUCCESSFUL_RETURN */
returnValue print( const int* const index, /**< Index array to be printed. */
int n /**< Length of index array. */
);
/** Prints a named index array.
* \return SUCCESSFUL_RETURN */
returnValue print( const int* const index, /**< Index array to be printed. */
int n, /**< Length of index array. */
const char* name /**< Name of index array. */
);
/** Prints a string to desired output target (useful also for MATLAB output!).
* \return SUCCESSFUL_RETURN */
returnValue myPrintf( const char* s /**< String to be written. */
);
/** Prints qpOASES copyright notice.
* \return SUCCESSFUL_RETURN */
returnValue printCopyrightNotice( );
/** Reads a real_t matrix from file.
* \return SUCCESSFUL_RETURN \n
RET_UNABLE_TO_OPEN_FILE \n
RET_UNABLE_TO_READ_FILE */
returnValue readFromFile( real_t* data, /**< Matrix to be read from file. */
int nrow, /**< Row number of matrix. */
int ncol, /**< Column number of matrix. */
const char* datafilename /**< Data file name. */
);
/** Reads a real_t vector from file.
* \return SUCCESSFUL_RETURN \n
RET_UNABLE_TO_OPEN_FILE \n
RET_UNABLE_TO_READ_FILE */
returnValue readFromFile( real_t* data, /**< Vector to be read from file. */
int n, /**< Length of vector. */
const char* datafilename /**< Data file name. */
);
/** Reads an integer (column) vector from file.
* \return SUCCESSFUL_RETURN \n
RET_UNABLE_TO_OPEN_FILE \n
RET_UNABLE_TO_READ_FILE */
returnValue readFromFile( int* data, /**< Vector to be read from file. */
int n, /**< Length of vector. */
const char* datafilename /**< Data file name. */
);
/** Writes a real_t matrix into a file.
* \return SUCCESSFUL_RETURN \n
RET_UNABLE_TO_OPEN_FILE */
returnValue writeIntoFile( const real_t* const data, /**< Matrix to be written into file. */
int nrow, /**< Row number of matrix. */
int ncol, /**< Column number of matrix. */
const char* datafilename, /**< Data file name. */
BooleanType append /**< Indicates if data shall be appended if the file already exists (otherwise it is overwritten). */
);
/** Writes a real_t vector into a file.
* \return SUCCESSFUL_RETURN \n
RET_UNABLE_TO_OPEN_FILE */
returnValue writeIntoFile( const real_t* const data, /**< Vector to be written into file. */
int n, /**< Length of vector. */
const char* datafilename, /**< Data file name. */
BooleanType append /**< Indicates if data shall be appended if the file already exists (otherwise it is overwritten). */
);
/** Writes an integer (column) vector into a file.
* \return SUCCESSFUL_RETURN \n
RET_UNABLE_TO_OPEN_FILE */
returnValue writeIntoFile( const int* const integer, /**< Integer vector to be written into file. */
int n, /**< Length of vector. */
const char* datafilename, /**< Data file name. */
BooleanType append /**< Indicates if integer shall be appended if the file already exists (otherwise it is overwritten). */
);
#endif /* PC_DEBUG */
/** Returns the current system time.
* \return current system time */
real_t getCPUtime( );
/** Returns the Euclidean norm of a vector.
* \return 0: successful */
real_t getNorm( const real_t* const v, /**< Vector. */
int n /**< Vector's dimension. */
);
/** Returns the absolute value of a real_t.
* \return Absolute value of a real_t */
inline real_t getAbs( real_t x /**< Input argument. */
);
#include <Utils.ipp>
#endif /* QPOASES_UTILS_HPP */
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file INCLUDE/Utils.hpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of global utility functions for working with qpOASES.
*/
#ifndef QPOASES_UTILS_HPP
#define QPOASES_UTILS_HPP
#include <MessageHandling.hpp>
#ifdef PC_DEBUG /* Define print functions only for debugging! */
/** Prints a vector.
* \return SUCCESSFUL_RETURN */
returnValue print( const real_t* const v, /**< Vector to be printed. */
int n /**< Length of vector. */
);
/** Prints a permuted vector.
* \return SUCCESSFUL_RETURN */
returnValue print( const real_t* const v, /**< Vector to be printed. */
int n, /**< Length of vector. */
const int* const V_idx /**< Pemutation vector. */
);
/** Prints a named vector.
* \return SUCCESSFUL_RETURN */
returnValue print( const real_t* const v, /**< Vector to be printed. */
int n, /**< Length of vector. */
const char* name /** Name of vector. */
);
/** Prints a matrix.
* \return SUCCESSFUL_RETURN */
returnValue print( const real_t* const M, /**< Matrix to be printed. */
int nrow, /**< Row number of matrix. */
int ncol /**< Column number of matrix. */
);
/** Prints a permuted matrix.
* \return SUCCESSFUL_RETURN */
returnValue print( const real_t* const M, /**< Matrix to be printed. */
int nrow, /**< Row number of matrix. */
int ncol , /**< Column number of matrix. */
const int* const ROW_idx, /**< Row pemutation vector. */
const int* const COL_idx /**< Column pemutation vector. */
);
/** Prints a named matrix.
* \return SUCCESSFUL_RETURN */
returnValue print( const real_t* const M, /**< Matrix to be printed. */
int nrow, /**< Row number of matrix. */
int ncol, /**< Column number of matrix. */
const char* name /** Name of matrix. */
);
/** Prints an index array.
* \return SUCCESSFUL_RETURN */
returnValue print( const int* const index, /**< Index array to be printed. */
int n /**< Length of index array. */
);
/** Prints a named index array.
* \return SUCCESSFUL_RETURN */
returnValue print( const int* const index, /**< Index array to be printed. */
int n, /**< Length of index array. */
const char* name /**< Name of index array. */
);
/** Prints a string to desired output target (useful also for MATLAB output!).
* \return SUCCESSFUL_RETURN */
returnValue myPrintf( const char* s /**< String to be written. */
);
/** Prints qpOASES copyright notice.
* \return SUCCESSFUL_RETURN */
returnValue printCopyrightNotice( );
/** Reads a real_t matrix from file.
* \return SUCCESSFUL_RETURN \n
RET_UNABLE_TO_OPEN_FILE \n
RET_UNABLE_TO_READ_FILE */
returnValue readFromFile( real_t* data, /**< Matrix to be read from file. */
int nrow, /**< Row number of matrix. */
int ncol, /**< Column number of matrix. */
const char* datafilename /**< Data file name. */
);
/** Reads a real_t vector from file.
* \return SUCCESSFUL_RETURN \n
RET_UNABLE_TO_OPEN_FILE \n
RET_UNABLE_TO_READ_FILE */
returnValue readFromFile( real_t* data, /**< Vector to be read from file. */
int n, /**< Length of vector. */
const char* datafilename /**< Data file name. */
);
/** Reads an integer (column) vector from file.
* \return SUCCESSFUL_RETURN \n
RET_UNABLE_TO_OPEN_FILE \n
RET_UNABLE_TO_READ_FILE */
returnValue readFromFile( int* data, /**< Vector to be read from file. */
int n, /**< Length of vector. */
const char* datafilename /**< Data file name. */
);
/** Writes a real_t matrix into a file.
* \return SUCCESSFUL_RETURN \n
RET_UNABLE_TO_OPEN_FILE */
returnValue writeIntoFile( const real_t* const data, /**< Matrix to be written into file. */
int nrow, /**< Row number of matrix. */
int ncol, /**< Column number of matrix. */
const char* datafilename, /**< Data file name. */
BooleanType append /**< Indicates if data shall be appended if the file already exists (otherwise it is overwritten). */
);
/** Writes a real_t vector into a file.
* \return SUCCESSFUL_RETURN \n
RET_UNABLE_TO_OPEN_FILE */
returnValue writeIntoFile( const real_t* const data, /**< Vector to be written into file. */
int n, /**< Length of vector. */
const char* datafilename, /**< Data file name. */
BooleanType append /**< Indicates if data shall be appended if the file already exists (otherwise it is overwritten). */
);
/** Writes an integer (column) vector into a file.
* \return SUCCESSFUL_RETURN \n
RET_UNABLE_TO_OPEN_FILE */
returnValue writeIntoFile( const int* const integer, /**< Integer vector to be written into file. */
int n, /**< Length of vector. */
const char* datafilename, /**< Data file name. */
BooleanType append /**< Indicates if integer shall be appended if the file already exists (otherwise it is overwritten). */
);
#endif /* PC_DEBUG */
/** Returns the current system time.
* \return current system time */
real_t getCPUtime( );
/** Returns the Euclidean norm of a vector.
* \return 0: successful */
real_t getNorm( const real_t* const v, /**< Vector. */
int n /**< Vector's dimension. */
);
/** Returns the absolute value of a real_t.
* \return Absolute value of a real_t */
inline real_t getAbs( real_t x /**< Input argument. */
);
#include <Utils.ipp>
#endif /* QPOASES_UTILS_HPP */
/*
* end of file
*/
File diff suppressed because it is too large Load Diff
+92 -92
View File
@@ -1,92 +1,92 @@
##
## qpOASES -- An Implementation of the Online Active Set Strategy.
## Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
##
## qpOASES is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## qpOASES is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with qpOASES; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
##
INTRODUCTION
=============
qpOASES is an open-source C++ implementation of the recently proposed
online active set strategy (see [1], [2]), which was inspired by important
observations from the field of parametric quadratic programming. It has
several theoretical features that make it particularly suited for model
predictive control (MPC) applications.
The software package qpOASES implements these ideas and has already been
successfully used for closed-loop control of a real-world Diesel engine [3].
References:
[1] H.J. Ferreau. An Online Active Set Strategy for Fast Solution of
Parametric Quadratic Programs with Applications to Predictive Engine Control.
Diplom thesis, University of Heidelberg, 2006.
[2] H.J. Ferreau, H.G. Bock, M. Diehl. An online active set strategy to
overcome the limitations of explicit MPC. International Journal of Robust
and Nonlinear Control, 18 (8), pp. 816-830, 2008.
[3] H.J. Ferreau, P. Ortner, P. Langthaler, L. del Re, M. Diehl. Predictive
Control of a Real-World Diesel Engine using an Extended Online Active Set
Strategy. Annual Reviews in Control, 31 (2), pp. 293-301, 2007.
GETTING STARTED
================
1. For installation, usage and additional information on this software package
see the qpOASES User's Manual located at ./DOC/manual.pdf!
2. The file ./LICENSE.txt contains a copy of the GNU Lesser General Public
License. Please read it carefully before using qpOASES!
3. The whole software package can be downloaded from
http://homes.esat.kuleuven.be/~optec/software/qpOASES/
On this webpage you will also find a list of frequently asked questions.
CONTACT THE AUTHORS
====================
If you have got questions, remarks or comments on qpOASES
please contact the main author:
Hans Joachim Ferreau
Katholieke Universiteit Leuven
Department of Electrical Engineering (ESAT)
Kasteelpark Arenberg 10, bus 2446
B-3001 Leuven-Heverlee, Belgium
Phone: +32 16 32 03 63
E-mail: joachim.ferreau@esat.kuleuven.be
qpOASES@esat.kuleuven.be
Also bug reports and source code extensions are most welcome!
##
## end of file
##
##
## qpOASES -- An Implementation of the Online Active Set Strategy.
## Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
##
## qpOASES is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## qpOASES is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with qpOASES; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
##
INTRODUCTION
=============
qpOASES is an open-source C++ implementation of the recently proposed
online active set strategy (see [1], [2]), which was inspired by important
observations from the field of parametric quadratic programming. It has
several theoretical features that make it particularly suited for model
predictive control (MPC) applications.
The software package qpOASES implements these ideas and has already been
successfully used for closed-loop control of a real-world Diesel engine [3].
References:
[1] H.J. Ferreau. An Online Active Set Strategy for Fast Solution of
Parametric Quadratic Programs with Applications to Predictive Engine Control.
Diplom thesis, University of Heidelberg, 2006.
[2] H.J. Ferreau, H.G. Bock, M. Diehl. An online active set strategy to
overcome the limitations of explicit MPC. International Journal of Robust
and Nonlinear Control, 18 (8), pp. 816-830, 2008.
[3] H.J. Ferreau, P. Ortner, P. Langthaler, L. del Re, M. Diehl. Predictive
Control of a Real-World Diesel Engine using an Extended Online Active Set
Strategy. Annual Reviews in Control, 31 (2), pp. 293-301, 2007.
GETTING STARTED
================
1. For installation, usage and additional information on this software package
see the qpOASES User's Manual located at ./DOC/manual.pdf!
2. The file ./LICENSE.txt contains a copy of the GNU Lesser General Public
License. Please read it carefully before using qpOASES!
3. The whole software package can be downloaded from
http://homes.esat.kuleuven.be/~optec/software/qpOASES/
On this webpage you will also find a list of frequently asked questions.
CONTACT THE AUTHORS
====================
If you have got questions, remarks or comments on qpOASES
please contact the main author:
Hans Joachim Ferreau
Katholieke Universiteit Leuven
Department of Electrical Engineering (ESAT)
Kasteelpark Arenberg 10, bus 2446
B-3001 Leuven-Heverlee, Belgium
Phone: +32 16 32 03 63
E-mail: joachim.ferreau@esat.kuleuven.be
qpOASES@esat.kuleuven.be
Also bug reports and source code extensions are most welcome!
##
## end of file
##
+252 -252
View File
@@ -1,252 +1,252 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Bounds.cpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of the Bounds class designed to manage working sets of
* bounds within a QProblem.
*/
#include <Bounds.hpp>
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* B o u n d s
*/
Bounds::Bounds( ) : SubjectTo( ),
nV( 0 ),
nFV( 0 ),
nBV( 0 ),
nUV( 0 )
{
}
/*
* B o u n d s
*/
Bounds::Bounds( const Bounds& rhs ) : SubjectTo( rhs ),
nV( rhs.nV ),
nFV( rhs.nFV ),
nBV( rhs.nBV ),
nUV( rhs.nUV )
{
free = rhs.free;
fixed = rhs.fixed;
}
/*
* ~ B o u n d s
*/
Bounds::~Bounds( )
{
}
/*
* o p e r a t o r =
*/
Bounds& Bounds::operator=( const Bounds& rhs )
{
if ( this != &rhs )
{
SubjectTo::operator=( rhs );
nV = rhs.nV;
nFV = rhs.nFV;
nBV = rhs.nBV;
nUV = rhs.nUV;
free = rhs.free;
fixed = rhs.fixed;
}
return *this;
}
/*
* i n i t
*/
returnValue Bounds::init( int n )
{
nV = n;
nFV = 0;
nBV = 0;
nUV = 0;
free.init( );
fixed.init( );
return SubjectTo::init( n );
}
/*
* s e t u p B o u n d
*/
returnValue Bounds::setupBound( int _number, SubjectToStatus _status
)
{
/* consistency check */
if ( ( _number < 0 ) || ( _number >= getNV( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Add bound index to respective index list. */
switch ( _status )
{
case ST_INACTIVE:
if ( this->addIndex( this->getFree( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_BOUND_FAILED );
break;
case ST_LOWER:
if ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_BOUND_FAILED );
break;
case ST_UPPER:
if ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_BOUND_FAILED );
break;
default:
return THROWERROR( RET_INVALID_ARGUMENTS );
}
return SUCCESSFUL_RETURN;
}
/*
* s e t u p A l l F r e e
*/
returnValue Bounds::setupAllFree( )
{
int i;
/* 1) Place unbounded variables at the beginning of the index list of free variables. */
for( i=0; i<nV; ++i )
{
if ( getType( i ) == ST_UNBOUNDED )
{
if ( setupBound( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_BOUND_FAILED );
}
}
/* 2) Add remaining (i.e. bounded but possibly free) variables to the index list of free variables. */
for( i=0; i<nV; ++i )
{
if ( getType( i ) == ST_BOUNDED )
{
if ( setupBound( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_BOUND_FAILED );
}
}
/* 3) Place implicitly fixed variables at the end of the index list of free variables. */
for( i=0; i<nV; ++i )
{
if ( getType( i ) == ST_EQUALITY )
{
if ( setupBound( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_BOUND_FAILED );
}
}
return SUCCESSFUL_RETURN;
}
/*
* m o v e F i x e d T o F r e e
*/
returnValue Bounds::moveFixedToFree( int _number )
{
/* consistency check */
if ( ( _number < 0 ) || ( _number >= getNV( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Move index from indexlist of fixed variables to that of free ones. */
if ( this->removeIndex( this->getFixed( ),_number ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
if ( this->addIndex( this->getFree( ),_number,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
return SUCCESSFUL_RETURN;
}
/*
* m o v e F r e e T o F i x e d
*/
returnValue Bounds::moveFreeToFixed( int _number, SubjectToStatus _status
)
{
/* consistency check */
if ( ( _number < 0 ) || ( _number >= getNV( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Move index from indexlist of free variables to that of fixed ones. */
if ( this->removeIndex( this->getFree( ),_number ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
if ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
return SUCCESSFUL_RETURN;
}
/*
* s w a p F r e e
*/
returnValue Bounds::swapFree( int number1, int number2
)
{
/* consistency check */
if ( ( number1 < 0 ) || ( number1 >= getNV( ) ) || ( number2 < 0 ) || ( number2 >= getNV( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Swap index within indexlist of free variables. */
return this->swapIndex( this->getFree( ),number1,number2 );
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Bounds.cpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of the Bounds class designed to manage working sets of
* bounds within a QProblem.
*/
#include <Bounds.hpp>
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* B o u n d s
*/
Bounds::Bounds( ) : SubjectTo( ),
nV( 0 ),
nFV( 0 ),
nBV( 0 ),
nUV( 0 )
{
}
/*
* B o u n d s
*/
Bounds::Bounds( const Bounds& rhs ) : SubjectTo( rhs ),
nV( rhs.nV ),
nFV( rhs.nFV ),
nBV( rhs.nBV ),
nUV( rhs.nUV )
{
free = rhs.free;
fixed = rhs.fixed;
}
/*
* ~ B o u n d s
*/
Bounds::~Bounds( )
{
}
/*
* o p e r a t o r =
*/
Bounds& Bounds::operator=( const Bounds& rhs )
{
if ( this != &rhs )
{
SubjectTo::operator=( rhs );
nV = rhs.nV;
nFV = rhs.nFV;
nBV = rhs.nBV;
nUV = rhs.nUV;
free = rhs.free;
fixed = rhs.fixed;
}
return *this;
}
/*
* i n i t
*/
returnValue Bounds::init( int n )
{
nV = n;
nFV = 0;
nBV = 0;
nUV = 0;
free.init( );
fixed.init( );
return SubjectTo::init( n );
}
/*
* s e t u p B o u n d
*/
returnValue Bounds::setupBound( int _number, SubjectToStatus _status
)
{
/* consistency check */
if ( ( _number < 0 ) || ( _number >= getNV( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Add bound index to respective index list. */
switch ( _status )
{
case ST_INACTIVE:
if ( this->addIndex( this->getFree( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_BOUND_FAILED );
break;
case ST_LOWER:
if ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_BOUND_FAILED );
break;
case ST_UPPER:
if ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_BOUND_FAILED );
break;
default:
return THROWERROR( RET_INVALID_ARGUMENTS );
}
return SUCCESSFUL_RETURN;
}
/*
* s e t u p A l l F r e e
*/
returnValue Bounds::setupAllFree( )
{
int i;
/* 1) Place unbounded variables at the beginning of the index list of free variables. */
for( i=0; i<nV; ++i )
{
if ( getType( i ) == ST_UNBOUNDED )
{
if ( setupBound( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_BOUND_FAILED );
}
}
/* 2) Add remaining (i.e. bounded but possibly free) variables to the index list of free variables. */
for( i=0; i<nV; ++i )
{
if ( getType( i ) == ST_BOUNDED )
{
if ( setupBound( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_BOUND_FAILED );
}
}
/* 3) Place implicitly fixed variables at the end of the index list of free variables. */
for( i=0; i<nV; ++i )
{
if ( getType( i ) == ST_EQUALITY )
{
if ( setupBound( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_BOUND_FAILED );
}
}
return SUCCESSFUL_RETURN;
}
/*
* m o v e F i x e d T o F r e e
*/
returnValue Bounds::moveFixedToFree( int _number )
{
/* consistency check */
if ( ( _number < 0 ) || ( _number >= getNV( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Move index from indexlist of fixed variables to that of free ones. */
if ( this->removeIndex( this->getFixed( ),_number ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
if ( this->addIndex( this->getFree( ),_number,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
return SUCCESSFUL_RETURN;
}
/*
* m o v e F r e e T o F i x e d
*/
returnValue Bounds::moveFreeToFixed( int _number, SubjectToStatus _status
)
{
/* consistency check */
if ( ( _number < 0 ) || ( _number >= getNV( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Move index from indexlist of free variables to that of fixed ones. */
if ( this->removeIndex( this->getFree( ),_number ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
if ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
return SUCCESSFUL_RETURN;
}
/*
* s w a p F r e e
*/
returnValue Bounds::swapFree( int number1, int number2
)
{
/* consistency check */
if ( ( number1 < 0 ) || ( number1 >= getNV( ) ) || ( number2 < 0 ) || ( number2 >= getNV( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Swap index within indexlist of free variables. */
return this->swapIndex( this->getFree( ),number1,number2 );
}
/*
* end of file
*/
+144 -144
View File
@@ -1,144 +1,144 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Bounds.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of inlined member functions of the Bounds class designed
* to manage working sets of bounds within a QProblem.
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t N V
*/
inline int Bounds::getNV( ) const
{
return nV;
}
/*
* g e t N F X
*/
inline int Bounds::getNFV( ) const
{
return nFV;
}
/*
* g e t N B V
*/
inline int Bounds::getNBV( ) const
{
return nBV;
}
/*
* g e t N U V
*/
inline int Bounds::getNUV( ) const
{
return nUV;
}
/*
* s e t N F X
*/
inline returnValue Bounds::setNFV( int n )
{
nFV = n;
return SUCCESSFUL_RETURN;
}
/*
* s e t N B V
*/
inline returnValue Bounds::setNBV( int n )
{
nBV = n;
return SUCCESSFUL_RETURN;
}
/*
* s e t N U V
*/
inline returnValue Bounds::setNUV( int n )
{
nUV = n;
return SUCCESSFUL_RETURN;
}
/*
* g e t N F R
*/
inline int Bounds::getNFR( )
{
return free.getLength( );
}
/*
* g e t N F X
*/
inline int Bounds::getNFX( )
{
return fixed.getLength( );
}
/*
* g e t F r e e
*/
inline Indexlist* Bounds::getFree( )
{
return &free;
}
/*
* g e t F i x e d
*/
inline Indexlist* Bounds::getFixed( )
{
return &fixed;
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Bounds.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of inlined member functions of the Bounds class designed
* to manage working sets of bounds within a QProblem.
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t N V
*/
inline int Bounds::getNV( ) const
{
return nV;
}
/*
* g e t N F X
*/
inline int Bounds::getNFV( ) const
{
return nFV;
}
/*
* g e t N B V
*/
inline int Bounds::getNBV( ) const
{
return nBV;
}
/*
* g e t N U V
*/
inline int Bounds::getNUV( ) const
{
return nUV;
}
/*
* s e t N F X
*/
inline returnValue Bounds::setNFV( int n )
{
nFV = n;
return SUCCESSFUL_RETURN;
}
/*
* s e t N B V
*/
inline returnValue Bounds::setNBV( int n )
{
nBV = n;
return SUCCESSFUL_RETURN;
}
/*
* s e t N U V
*/
inline returnValue Bounds::setNUV( int n )
{
nUV = n;
return SUCCESSFUL_RETURN;
}
/*
* g e t N F R
*/
inline int Bounds::getNFR( )
{
return free.getLength( );
}
/*
* g e t N F X
*/
inline int Bounds::getNFX( )
{
return fixed.getLength( );
}
/*
* g e t F r e e
*/
inline Indexlist* Bounds::getFree( )
{
return &free;
}
/*
* g e t F i x e d
*/
inline Indexlist* Bounds::getFixed( )
{
return &fixed;
}
/*
* end of file
*/
+248 -248
View File
@@ -1,248 +1,248 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Constraints.cpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of the Constraints class designed to manage working sets of
* constraints within a QProblem.
*/
#include <Constraints.hpp>
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* C o n s t r a i n t s
*/
Constraints::Constraints( ) : SubjectTo( ),
nC( 0 ),
nEC( 0 ),
nIC( 0 ),
nUC( 0 )
{
}
/*
* C o n s t r a i n t s
*/
Constraints::Constraints( const Constraints& rhs ) : SubjectTo( rhs ),
nC( rhs.nC ),
nEC( rhs.nEC ),
nIC( rhs.nIC ),
nUC( rhs.nUC )
{
active = rhs.active;
inactive = rhs.inactive;
}
/*
* ~ C o n s t r a i n t s
*/
Constraints::~Constraints( )
{
}
/*
* o p e r a t o r =
*/
Constraints& Constraints::operator=( const Constraints& rhs )
{
if ( this != &rhs )
{
SubjectTo::operator=( rhs );
nC = rhs.nC;
nEC = rhs.nEC;
nIC = rhs.nIC;
nUC = rhs.nUC;
active = rhs.active;
inactive = rhs.inactive;
}
return *this;
}
/*
* i n i t
*/
returnValue Constraints::init( int n )
{
nC = n;
nEC = 0;
nIC = 0;
nUC = 0;
active.init( );
inactive.init( );
return SubjectTo::init( n );
}
/*
* s e t u p C o n s t r a i n t
*/
returnValue Constraints::setupConstraint( int _number, SubjectToStatus _status
)
{
/* consistency check */
if ( ( _number < 0 ) || ( _number >= getNC( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Add constraint index to respective index list. */
switch ( _status )
{
case ST_INACTIVE:
if ( this->addIndex( this->getInactive( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
break;
case ST_LOWER:
if ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
break;
case ST_UPPER:
if ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
break;
default:
return THROWERROR( RET_INVALID_ARGUMENTS );
}
return SUCCESSFUL_RETURN;
}
/*
* s e t u p A l l I n a c t i v e
*/
returnValue Constraints::setupAllInactive( )
{
int i;
/* 1) Place unbounded constraints at the beginning of the index list of inactive constraints. */
for( i=0; i<nC; ++i )
{
if ( getType( i ) == ST_UNBOUNDED )
{
if ( setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
}
}
/* 2) Add remaining (i.e. "real" inequality) constraints to the index list of inactive constraints. */
for( i=0; i<nC; ++i )
{
if ( getType( i ) == ST_BOUNDED )
{
if ( setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
}
}
/* 3) Place implicit equality constraints at the end of the index list of inactive constraints. */
for( i=0; i<nC; ++i )
{
if ( getType( i ) == ST_EQUALITY )
{
if ( setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
}
}
/* 4) Moreover, add all constraints of unknown type. */
for( i=0; i<nC; ++i )
{
if ( getType( i ) == ST_UNKNOWN )
{
if ( setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
}
}
return SUCCESSFUL_RETURN;
}
/*
* m o v e A c t i v e T o I n a c t i v e
*/
returnValue Constraints::moveActiveToInactive( int _number )
{
/* consistency check */
if ( ( _number < 0 ) || ( _number >= getNC( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Move index from indexlist of active constraints to that of inactive ones. */
if ( this->removeIndex( this->getActive( ),_number ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
if ( this->addIndex( this->getInactive( ),_number,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
return SUCCESSFUL_RETURN;
}
/*
* m o v e I n a c t i v e T o A c t i v e
*/
returnValue Constraints::moveInactiveToActive( int _number, SubjectToStatus _status
)
{
/* consistency check */
if ( ( _number < 0 ) || ( _number >= getNC( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Move index from indexlist of inactive constraints to that of active ones. */
if ( this->removeIndex( this->getInactive( ),_number ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
if ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
return SUCCESSFUL_RETURN;
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Constraints.cpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of the Constraints class designed to manage working sets of
* constraints within a QProblem.
*/
#include <Constraints.hpp>
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* C o n s t r a i n t s
*/
Constraints::Constraints( ) : SubjectTo( ),
nC( 0 ),
nEC( 0 ),
nIC( 0 ),
nUC( 0 )
{
}
/*
* C o n s t r a i n t s
*/
Constraints::Constraints( const Constraints& rhs ) : SubjectTo( rhs ),
nC( rhs.nC ),
nEC( rhs.nEC ),
nIC( rhs.nIC ),
nUC( rhs.nUC )
{
active = rhs.active;
inactive = rhs.inactive;
}
/*
* ~ C o n s t r a i n t s
*/
Constraints::~Constraints( )
{
}
/*
* o p e r a t o r =
*/
Constraints& Constraints::operator=( const Constraints& rhs )
{
if ( this != &rhs )
{
SubjectTo::operator=( rhs );
nC = rhs.nC;
nEC = rhs.nEC;
nIC = rhs.nIC;
nUC = rhs.nUC;
active = rhs.active;
inactive = rhs.inactive;
}
return *this;
}
/*
* i n i t
*/
returnValue Constraints::init( int n )
{
nC = n;
nEC = 0;
nIC = 0;
nUC = 0;
active.init( );
inactive.init( );
return SubjectTo::init( n );
}
/*
* s e t u p C o n s t r a i n t
*/
returnValue Constraints::setupConstraint( int _number, SubjectToStatus _status
)
{
/* consistency check */
if ( ( _number < 0 ) || ( _number >= getNC( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Add constraint index to respective index list. */
switch ( _status )
{
case ST_INACTIVE:
if ( this->addIndex( this->getInactive( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
break;
case ST_LOWER:
if ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
break;
case ST_UPPER:
if ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
break;
default:
return THROWERROR( RET_INVALID_ARGUMENTS );
}
return SUCCESSFUL_RETURN;
}
/*
* s e t u p A l l I n a c t i v e
*/
returnValue Constraints::setupAllInactive( )
{
int i;
/* 1) Place unbounded constraints at the beginning of the index list of inactive constraints. */
for( i=0; i<nC; ++i )
{
if ( getType( i ) == ST_UNBOUNDED )
{
if ( setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
}
}
/* 2) Add remaining (i.e. "real" inequality) constraints to the index list of inactive constraints. */
for( i=0; i<nC; ++i )
{
if ( getType( i ) == ST_BOUNDED )
{
if ( setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
}
}
/* 3) Place implicit equality constraints at the end of the index list of inactive constraints. */
for( i=0; i<nC; ++i )
{
if ( getType( i ) == ST_EQUALITY )
{
if ( setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
}
}
/* 4) Moreover, add all constraints of unknown type. */
for( i=0; i<nC; ++i )
{
if ( getType( i ) == ST_UNKNOWN )
{
if ( setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
}
}
return SUCCESSFUL_RETURN;
}
/*
* m o v e A c t i v e T o I n a c t i v e
*/
returnValue Constraints::moveActiveToInactive( int _number )
{
/* consistency check */
if ( ( _number < 0 ) || ( _number >= getNC( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Move index from indexlist of active constraints to that of inactive ones. */
if ( this->removeIndex( this->getActive( ),_number ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
if ( this->addIndex( this->getInactive( ),_number,ST_INACTIVE ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
return SUCCESSFUL_RETURN;
}
/*
* m o v e I n a c t i v e T o A c t i v e
*/
returnValue Constraints::moveInactiveToActive( int _number, SubjectToStatus _status
)
{
/* consistency check */
if ( ( _number < 0 ) || ( _number >= getNC( ) ) )
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
/* Move index from indexlist of inactive constraints to that of active ones. */
if ( this->removeIndex( this->getInactive( ),_number ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
if ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_MOVING_BOUND_FAILED );
return SUCCESSFUL_RETURN;
}
/*
* end of file
*/
+144 -144
View File
@@ -1,144 +1,144 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Constraints.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of inlined member functions of the Constraints class designed
* to manage working sets of constraints within a QProblem.
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t N C
*/
inline int Constraints::getNC( ) const
{
return nC;
}
/*
* g e t N E C
*/
inline int Constraints::getNEC( ) const
{
return nEC;
}
/*
* g e t N I C
*/
inline int Constraints::getNIC( ) const
{
return nIC;
}
/*
* g e t N U C
*/
inline int Constraints::getNUC( ) const
{
return nUC;
}
/*
* s e t N E C
*/
inline returnValue Constraints::setNEC( int n )
{
nEC = n;
return SUCCESSFUL_RETURN;
}
/*
* s e t N I C
*/
inline returnValue Constraints::setNIC( int n )
{
nIC = n;
return SUCCESSFUL_RETURN;
}
/*
* s e t N U C
*/
inline returnValue Constraints::setNUC( int n )
{
nUC = n;
return SUCCESSFUL_RETURN;
}
/*
* g e t N A C
*/
inline int Constraints::getNAC( )
{
return active.getLength( );
}
/*
* g e t N I A C
*/
inline int Constraints::getNIAC( )
{
return inactive.getLength( );
}
/*
* g e t A c t i v e
*/
inline Indexlist* Constraints::getActive( )
{
return &active;
}
/*
* g e t I n a c t i v e
*/
inline Indexlist* Constraints::getInactive( )
{
return &inactive;
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Constraints.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Declaration of inlined member functions of the Constraints class designed
* to manage working sets of constraints within a QProblem.
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t N C
*/
inline int Constraints::getNC( ) const
{
return nC;
}
/*
* g e t N E C
*/
inline int Constraints::getNEC( ) const
{
return nEC;
}
/*
* g e t N I C
*/
inline int Constraints::getNIC( ) const
{
return nIC;
}
/*
* g e t N U C
*/
inline int Constraints::getNUC( ) const
{
return nUC;
}
/*
* s e t N E C
*/
inline returnValue Constraints::setNEC( int n )
{
nEC = n;
return SUCCESSFUL_RETURN;
}
/*
* s e t N I C
*/
inline returnValue Constraints::setNIC( int n )
{
nIC = n;
return SUCCESSFUL_RETURN;
}
/*
* s e t N U C
*/
inline returnValue Constraints::setNUC( int n )
{
nUC = n;
return SUCCESSFUL_RETURN;
}
/*
* g e t N A C
*/
inline int Constraints::getNAC( )
{
return active.getLength( );
}
/*
* g e t N I A C
*/
inline int Constraints::getNIAC( )
{
return inactive.getLength( );
}
/*
* g e t A c t i v e
*/
inline Indexlist* Constraints::getActive( )
{
return &active;
}
/*
* g e t I n a c t i v e
*/
inline Indexlist* Constraints::getInactive( )
{
return &inactive;
}
/*
* end of file
*/
+188 -188
View File
@@ -1,188 +1,188 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/CyclingManager.cpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of the CyclingManager class designed to detect
* and handle possible cycling during QP iterations.
*
*/
#include <CyclingManager.hpp>
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* C y c l i n g M a n a g e r
*/
CyclingManager::CyclingManager( ) : nV( 0 ),
nC( 0 )
{
cyclingDetected = BT_FALSE;
}
/*
* C y c l i n g M a n a g e r
*/
CyclingManager::CyclingManager( const CyclingManager& rhs ) : nV( rhs.nV ),
nC( rhs.nC ),
cyclingDetected( rhs.cyclingDetected )
{
int i;
for( i=0; i<nV+nC; ++i )
status[i] = rhs.status[i];
}
/*
* ~ C y c l i n g M a n a g e r
*/
CyclingManager::~CyclingManager( )
{
}
/*
* o p e r a t o r =
*/
CyclingManager& CyclingManager::operator=( const CyclingManager& rhs )
{
int i;
if ( this != &rhs )
{
nV = rhs.nV;
nC = rhs.nC;
for( i=0; i<nV+nC; ++i )
status[i] = rhs.status[i];
cyclingDetected = rhs.cyclingDetected;
}
return *this;
}
/*
* i n i t
*/
returnValue CyclingManager::init( int _nV, int _nC )
{
nV = _nV;
nC = _nC;
cyclingDetected = BT_FALSE;
return SUCCESSFUL_RETURN;
}
/*
* s e t C y c l i n g S t a t u s
*/
returnValue CyclingManager::setCyclingStatus( int number,
BooleanType isBound, CyclingStatus _status
)
{
if ( isBound == BT_TRUE )
{
/* Set cycling status of a bound. */
if ( ( number >= 0 ) && ( number < nV ) )
{
status[number] = _status;
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
else
{
/* Set cycling status of a constraint. */
if ( ( number >= 0 ) && ( number < nC ) )
{
status[nV+number] = _status;
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
}
/*
* g e t C y c l i n g S t a t u s
*/
CyclingStatus CyclingManager::getCyclingStatus( int number, BooleanType isBound ) const
{
if ( isBound == BT_TRUE )
{
/* Return cycling status of a bound. */
if ( ( number >= 0 ) && ( number < nV ) )
return status[number];
}
else
{
/* Return cycling status of a constraint. */
if ( ( number >= 0 ) && ( number < nC ) )
return status[nV+number];
}
return CYC_NOT_INVOLVED;
}
/*
* c l e a r C y c l i n g D a t a
*/
returnValue CyclingManager::clearCyclingData( )
{
int i;
/* Reset all status values ... */
for( i=0; i<nV+nC; ++i )
status[i] = CYC_NOT_INVOLVED;
/* ... and the main cycling flag. */
cyclingDetected = BT_FALSE;
return SUCCESSFUL_RETURN;
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/CyclingManager.cpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of the CyclingManager class designed to detect
* and handle possible cycling during QP iterations.
*
*/
#include <CyclingManager.hpp>
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* C y c l i n g M a n a g e r
*/
CyclingManager::CyclingManager( ) : nV( 0 ),
nC( 0 )
{
cyclingDetected = BT_FALSE;
}
/*
* C y c l i n g M a n a g e r
*/
CyclingManager::CyclingManager( const CyclingManager& rhs ) : nV( rhs.nV ),
nC( rhs.nC ),
cyclingDetected( rhs.cyclingDetected )
{
int i;
for( i=0; i<nV+nC; ++i )
status[i] = rhs.status[i];
}
/*
* ~ C y c l i n g M a n a g e r
*/
CyclingManager::~CyclingManager( )
{
}
/*
* o p e r a t o r =
*/
CyclingManager& CyclingManager::operator=( const CyclingManager& rhs )
{
int i;
if ( this != &rhs )
{
nV = rhs.nV;
nC = rhs.nC;
for( i=0; i<nV+nC; ++i )
status[i] = rhs.status[i];
cyclingDetected = rhs.cyclingDetected;
}
return *this;
}
/*
* i n i t
*/
returnValue CyclingManager::init( int _nV, int _nC )
{
nV = _nV;
nC = _nC;
cyclingDetected = BT_FALSE;
return SUCCESSFUL_RETURN;
}
/*
* s e t C y c l i n g S t a t u s
*/
returnValue CyclingManager::setCyclingStatus( int number,
BooleanType isBound, CyclingStatus _status
)
{
if ( isBound == BT_TRUE )
{
/* Set cycling status of a bound. */
if ( ( number >= 0 ) && ( number < nV ) )
{
status[number] = _status;
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
else
{
/* Set cycling status of a constraint. */
if ( ( number >= 0 ) && ( number < nC ) )
{
status[nV+number] = _status;
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
}
/*
* g e t C y c l i n g S t a t u s
*/
CyclingStatus CyclingManager::getCyclingStatus( int number, BooleanType isBound ) const
{
if ( isBound == BT_TRUE )
{
/* Return cycling status of a bound. */
if ( ( number >= 0 ) && ( number < nV ) )
return status[number];
}
else
{
/* Return cycling status of a constraint. */
if ( ( number >= 0 ) && ( number < nC ) )
return status[nV+number];
}
return CYC_NOT_INVOLVED;
}
/*
* c l e a r C y c l i n g D a t a
*/
returnValue CyclingManager::clearCyclingData( )
{
int i;
/* Reset all status values ... */
for( i=0; i<nV+nC; ++i )
status[i] = CYC_NOT_INVOLVED;
/* ... and the main cycling flag. */
cyclingDetected = BT_FALSE;
return SUCCESSFUL_RETURN;
}
/*
* end of file
*/
+51 -51
View File
@@ -1,51 +1,51 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/CyclingManager.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of inlined member functions of the CyclingManager class
* designed to detect and handle possible cycling during QP iterations.
*
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* i s C y c l i n g D e t e c t e d
*/
inline BooleanType CyclingManager::isCyclingDetected( ) const
{
return cyclingDetected;
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/CyclingManager.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of inlined member functions of the CyclingManager class
* designed to detect and handle possible cycling during QP iterations.
*
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* i s C y c l i n g D e t e c t e d
*/
inline BooleanType CyclingManager::isCyclingDetected( ) const
{
return cyclingDetected;
}
/*
* end of file
*/
+342 -342
View File
@@ -1,342 +1,342 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Indexlist.cpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of the Indexlist class designed to manage index lists of
* constraints and bounds within a QProblem_SubjectTo.
*/
#include <Indexlist.hpp>
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* I n d e x l i s t
*/
Indexlist::Indexlist( ) : length( 0 ),
first( -1 ),
last( -1 ),
lastusedindex( -1 ),
physicallength( INDEXLISTFACTOR*(NVMAX+NCMAX) )
{
int i;
for( i=0; i<physicallength; ++i )
{
number[i] = -1;
next[i] = -1;
previous[i] = -1;
}
}
/*
* I n d e x l i s t
*/
Indexlist::Indexlist( const Indexlist& rhs ) : length( rhs.length ),
first( rhs.first ),
last( rhs.last ),
lastusedindex( rhs.lastusedindex ),
physicallength( rhs.physicallength )
{
int i;
for( i=0; i<physicallength; ++i )
{
number[i] = rhs.number[i];
next[i] = rhs.next[i];
previous[i] = rhs.previous[i];
}
}
/*
* ~ I n d e x l i s t
*/
Indexlist::~Indexlist( )
{
}
/*
* o p e r a t o r =
*/
Indexlist& Indexlist::operator=( const Indexlist& rhs )
{
int i;
if ( this != &rhs )
{
length = rhs.length;
first = rhs.first;
last = rhs.last;
lastusedindex = rhs.lastusedindex;
physicallength = rhs.physicallength;
for( i=0; i<physicallength; ++i )
{
number[i] = rhs.number[i];
next[i] = rhs.next[i];
previous[i] = rhs.previous[i];
}
}
return *this;
}
/*
* i n i t
*/
returnValue Indexlist::init( )
{
int i;
length = 0;
first = -1;
last = -1;
lastusedindex = -1;
physicallength = INDEXLISTFACTOR*(NVMAX+NCMAX);
for( i=0; i<physicallength; ++i )
{
number[i] = -1;
next[i] = -1;
previous[i] = -1;
}
return SUCCESSFUL_RETURN;
}
/*
* g e t N u m b e r A r r a y
*/
returnValue Indexlist::getNumberArray( int* const numberarray ) const
{
int i;
int n = first;
/* Run trough indexlist and store numbers in numberarray. */
for( i=0; i<length; ++i )
{
if ( ( n >= 0 ) && ( number[n] >= 0 ) )
numberarray[i] = number[n];
else
return THROWERROR( RET_INDEXLIST_CORRUPTED );
n = next[n];
}
return SUCCESSFUL_RETURN;
}
/*
* g e t I n d e x
*/
int Indexlist::getIndex( int givennumber ) const
{
int i;
int n = first;
int index = -1; /* return -1 by default */
/* Run trough indexlist until number is found, if so return it index. */
for ( i=0; i<length; ++i )
{
if ( number[n] == givennumber )
{
index = i;
break;
}
n = next[n];
}
return index;
}
/*
* g e t P h y s i c a l I n d e x
*/
int Indexlist::getPhysicalIndex( int givennumber ) const
{
int i;
int n = first;
int index = -1; /* return -1 by default */
/* Run trough indexlist until number is found, if so return it physicalindex. */
for ( i=0; i<length; ++i )
{
if ( number[n] == givennumber )
{
index = n;
break;
}
n = next[n];
}
return index;
}
/*
* a d d N u m b e r
*/
returnValue Indexlist::addNumber( int addnumber )
{
int i;
if ( lastusedindex+1 < physicallength )
{
/* If there is enough storage, add number to indexlist. */
++lastusedindex;
number[lastusedindex] = addnumber;
next[lastusedindex] = 0;
if ( length == 0 )
{
first = lastusedindex;
previous[lastusedindex] = 0;
}
else
{
next[last] = lastusedindex;
previous[lastusedindex] = last;
}
last = lastusedindex;
++length;
return SUCCESSFUL_RETURN;
}
else
{
/* Rearrangement of index list necessary! */
if ( length == physicallength )
return THROWERROR( RET_INDEXLIST_EXCEEDS_MAX_LENGTH );
else
{
int numberArray[NVMAX+NCMAX];
getNumberArray( numberArray );
/* copy existing elements */
for ( i=0; i<length; ++i )
{
number[i] = numberArray[i];
next[i] = i+1;
previous[i] = i-1;
}
/* add new number at end of list */
number[length] = addnumber;
next[length] = -1;
previous[length] = length-1;
/* and set remaining entries to empty */
for ( i=length+1; i<physicallength; ++i )
{
number[i] = -1;
next[i] = -1;
previous[i] = -1;
}
first = 0;
last = length;
lastusedindex = length;
++length;
return THROWWARNING( RET_INDEXLIST_MUST_BE_REORDERD );
}
}
}
/*
* r e m o v e N u m b e r
*/
returnValue Indexlist::removeNumber( int removenumber )
{
int i = getPhysicalIndex( removenumber );
/* nothing to be done if number is not contained in index set */
if ( i < 0 )
return SUCCESSFUL_RETURN;
int p = previous[i];
int n = next[i];
if ( i == last )
last = p;
else
previous[n] = p;
if ( i == first )
first = n;
else
next[p] = n;
number[i] = -1;
next[i] = -1;
previous[i] = -1;
--length;
return SUCCESSFUL_RETURN;
}
/*
* s w a p N u m b e r s
*/
returnValue Indexlist::swapNumbers( int number1, int number2 )
{
int index1 = getPhysicalIndex( number1 );
int index2 = getPhysicalIndex( number2 );
/* consistency check */
if ( ( index1 < 0 ) || ( index2 < 0 ) )
return THROWERROR( RET_INDEXLIST_CORRUPTED );
int tmp = number[index1];
number[index1] = number[index2];
number[index2] = tmp;
return SUCCESSFUL_RETURN;
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Indexlist.cpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of the Indexlist class designed to manage index lists of
* constraints and bounds within a QProblem_SubjectTo.
*/
#include <Indexlist.hpp>
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* I n d e x l i s t
*/
Indexlist::Indexlist( ) : length( 0 ),
first( -1 ),
last( -1 ),
lastusedindex( -1 ),
physicallength( INDEXLISTFACTOR*(NVMAX+NCMAX) )
{
int i;
for( i=0; i<physicallength; ++i )
{
number[i] = -1;
next[i] = -1;
previous[i] = -1;
}
}
/*
* I n d e x l i s t
*/
Indexlist::Indexlist( const Indexlist& rhs ) : length( rhs.length ),
first( rhs.first ),
last( rhs.last ),
lastusedindex( rhs.lastusedindex ),
physicallength( rhs.physicallength )
{
int i;
for( i=0; i<physicallength; ++i )
{
number[i] = rhs.number[i];
next[i] = rhs.next[i];
previous[i] = rhs.previous[i];
}
}
/*
* ~ I n d e x l i s t
*/
Indexlist::~Indexlist( )
{
}
/*
* o p e r a t o r =
*/
Indexlist& Indexlist::operator=( const Indexlist& rhs )
{
int i;
if ( this != &rhs )
{
length = rhs.length;
first = rhs.first;
last = rhs.last;
lastusedindex = rhs.lastusedindex;
physicallength = rhs.physicallength;
for( i=0; i<physicallength; ++i )
{
number[i] = rhs.number[i];
next[i] = rhs.next[i];
previous[i] = rhs.previous[i];
}
}
return *this;
}
/*
* i n i t
*/
returnValue Indexlist::init( )
{
int i;
length = 0;
first = -1;
last = -1;
lastusedindex = -1;
physicallength = INDEXLISTFACTOR*(NVMAX+NCMAX);
for( i=0; i<physicallength; ++i )
{
number[i] = -1;
next[i] = -1;
previous[i] = -1;
}
return SUCCESSFUL_RETURN;
}
/*
* g e t N u m b e r A r r a y
*/
returnValue Indexlist::getNumberArray( int* const numberarray ) const
{
int i;
int n = first;
/* Run trough indexlist and store numbers in numberarray. */
for( i=0; i<length; ++i )
{
if ( ( n >= 0 ) && ( number[n] >= 0 ) )
numberarray[i] = number[n];
else
return THROWERROR( RET_INDEXLIST_CORRUPTED );
n = next[n];
}
return SUCCESSFUL_RETURN;
}
/*
* g e t I n d e x
*/
int Indexlist::getIndex( int givennumber ) const
{
int i;
int n = first;
int index = -1; /* return -1 by default */
/* Run trough indexlist until number is found, if so return it index. */
for ( i=0; i<length; ++i )
{
if ( number[n] == givennumber )
{
index = i;
break;
}
n = next[n];
}
return index;
}
/*
* g e t P h y s i c a l I n d e x
*/
int Indexlist::getPhysicalIndex( int givennumber ) const
{
int i;
int n = first;
int index = -1; /* return -1 by default */
/* Run trough indexlist until number is found, if so return it physicalindex. */
for ( i=0; i<length; ++i )
{
if ( number[n] == givennumber )
{
index = n;
break;
}
n = next[n];
}
return index;
}
/*
* a d d N u m b e r
*/
returnValue Indexlist::addNumber( int addnumber )
{
int i;
if ( lastusedindex+1 < physicallength )
{
/* If there is enough storage, add number to indexlist. */
++lastusedindex;
number[lastusedindex] = addnumber;
next[lastusedindex] = 0;
if ( length == 0 )
{
first = lastusedindex;
previous[lastusedindex] = 0;
}
else
{
next[last] = lastusedindex;
previous[lastusedindex] = last;
}
last = lastusedindex;
++length;
return SUCCESSFUL_RETURN;
}
else
{
/* Rearrangement of index list necessary! */
if ( length == physicallength )
return THROWERROR( RET_INDEXLIST_EXCEEDS_MAX_LENGTH );
else
{
int numberArray[NVMAX+NCMAX];
getNumberArray( numberArray );
/* copy existing elements */
for ( i=0; i<length; ++i )
{
number[i] = numberArray[i];
next[i] = i+1;
previous[i] = i-1;
}
/* add new number at end of list */
number[length] = addnumber;
next[length] = -1;
previous[length] = length-1;
/* and set remaining entries to empty */
for ( i=length+1; i<physicallength; ++i )
{
number[i] = -1;
next[i] = -1;
previous[i] = -1;
}
first = 0;
last = length;
lastusedindex = length;
++length;
return THROWWARNING( RET_INDEXLIST_MUST_BE_REORDERD );
}
}
}
/*
* r e m o v e N u m b e r
*/
returnValue Indexlist::removeNumber( int removenumber )
{
int i = getPhysicalIndex( removenumber );
/* nothing to be done if number is not contained in index set */
if ( i < 0 )
return SUCCESSFUL_RETURN;
int p = previous[i];
int n = next[i];
if ( i == last )
last = p;
else
previous[n] = p;
if ( i == first )
first = n;
else
next[p] = n;
number[i] = -1;
next[i] = -1;
previous[i] = -1;
--length;
return SUCCESSFUL_RETURN;
}
/*
* s w a p N u m b e r s
*/
returnValue Indexlist::swapNumbers( int number1, int number2 )
{
int index1 = getPhysicalIndex( number1 );
int index2 = getPhysicalIndex( number2 );
/* consistency check */
if ( ( index1 < 0 ) || ( index2 < 0 ) )
return THROWERROR( RET_INDEXLIST_CORRUPTED );
int tmp = number[index1];
number[index1] = number[index2];
number[index2] = tmp;
return SUCCESSFUL_RETURN;
}
/*
* end of file
*/
+85 -85
View File
@@ -1,85 +1,85 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Indexlist.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of inlined member functions of the Indexlist class designed
* to manage index lists of constraints and bounds within a QProblem_SubjectTo.
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t N u m b e r
*/
inline int Indexlist::getNumber( int physicalindex ) const
{
/* consistency check */
if ( ( physicalindex < 0 ) || ( physicalindex > length ) )
return -RET_INDEXLIST_OUTOFBOUNDS;
return number[physicalindex];
}
/*
* g e t L e n g t h
*/
inline int Indexlist::getLength( )
{
return length;
}
/*
* g e t L a s t N u m b e r
*/
inline int Indexlist::getLastNumber( ) const
{
return number[last];
}
/*
* g e t L a s t N u m b e r
*/
inline BooleanType Indexlist::isMember( int _number ) const
{
if ( getIndex( _number ) >= 0 )
return BT_TRUE;
else
return BT_FALSE;
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Indexlist.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of inlined member functions of the Indexlist class designed
* to manage index lists of constraints and bounds within a QProblem_SubjectTo.
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t N u m b e r
*/
inline int Indexlist::getNumber( int physicalindex ) const
{
/* consistency check */
if ( ( physicalindex < 0 ) || ( physicalindex > length ) )
return -RET_INDEXLIST_OUTOFBOUNDS;
return number[physicalindex];
}
/*
* g e t L e n g t h
*/
inline int Indexlist::getLength( )
{
return length;
}
/*
* g e t L a s t N u m b e r
*/
inline int Indexlist::getLastNumber( ) const
{
return number[last];
}
/*
* g e t L a s t N u m b e r
*/
inline BooleanType Indexlist::isMember( int _number ) const
{
if ( getIndex( _number ) >= 0 )
return BT_TRUE;
else
return BT_FALSE;
}
/*
* end of file
*/
File diff suppressed because it is too large Load Diff
+137 -137
View File
@@ -1,137 +1,137 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/MessageHandling.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of inlined member functions of the MessageHandling class.
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t E r r o r V i s i b i l i t y S t a t u s
*/
inline VisibilityStatus MessageHandling::getErrorVisibilityStatus( ) const
{
return errorVisibility;
}
/*
* g e t W a r n i n g V i s i b i l i t y S t a t u s
*/
inline VisibilityStatus MessageHandling::getWarningVisibilityStatus( ) const
{
return warningVisibility;
}
/*
* g e t I n f o V i s i b i l i t y S t a t u s
*/
inline VisibilityStatus MessageHandling::getInfoVisibilityStatus( ) const
{
return infoVisibility;
}
/*
* g e t O u t p u t F i l e
*/
inline myFILE* MessageHandling::getOutputFile( ) const
{
return outputFile;
}
/*
* g e t E r r o r C o u n t
*/
inline int MessageHandling::getErrorCount( ) const
{
return errorCount;
}
/*
* s e t E r r o r V i s i b i l i t y S t a t u s
*/
inline void MessageHandling::setErrorVisibilityStatus( VisibilityStatus _errorVisibility )
{
errorVisibility = _errorVisibility;
}
/*
* s e t W a r n i n g V i s i b i l i t y S t a t u s
*/
inline void MessageHandling::setWarningVisibilityStatus( VisibilityStatus _warningVisibility )
{
warningVisibility = _warningVisibility;
}
/*
* s e t I n f o V i s i b i l i t y S t a t u s
*/
inline void MessageHandling::setInfoVisibilityStatus( VisibilityStatus _infoVisibility )
{
infoVisibility = _infoVisibility;
}
/*
* s e t O u t p u t F i l e
*/
inline void MessageHandling::setOutputFile( myFILE* _outputFile )
{
outputFile = _outputFile;
}
/*
* s e t E r r o r C o u n t
*/
inline returnValue MessageHandling::setErrorCount( int _errorCount )
{
if ( _errorCount >= 0 )
{
errorCount = _errorCount;
return SUCCESSFUL_RETURN;
}
else
return RET_INVALID_ARGUMENTS;
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/MessageHandling.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of inlined member functions of the MessageHandling class.
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t E r r o r V i s i b i l i t y S t a t u s
*/
inline VisibilityStatus MessageHandling::getErrorVisibilityStatus( ) const
{
return errorVisibility;
}
/*
* g e t W a r n i n g V i s i b i l i t y S t a t u s
*/
inline VisibilityStatus MessageHandling::getWarningVisibilityStatus( ) const
{
return warningVisibility;
}
/*
* g e t I n f o V i s i b i l i t y S t a t u s
*/
inline VisibilityStatus MessageHandling::getInfoVisibilityStatus( ) const
{
return infoVisibility;
}
/*
* g e t O u t p u t F i l e
*/
inline myFILE* MessageHandling::getOutputFile( ) const
{
return outputFile;
}
/*
* g e t E r r o r C o u n t
*/
inline int MessageHandling::getErrorCount( ) const
{
return errorCount;
}
/*
* s e t E r r o r V i s i b i l i t y S t a t u s
*/
inline void MessageHandling::setErrorVisibilityStatus( VisibilityStatus _errorVisibility )
{
errorVisibility = _errorVisibility;
}
/*
* s e t W a r n i n g V i s i b i l i t y S t a t u s
*/
inline void MessageHandling::setWarningVisibilityStatus( VisibilityStatus _warningVisibility )
{
warningVisibility = _warningVisibility;
}
/*
* s e t I n f o V i s i b i l i t y S t a t u s
*/
inline void MessageHandling::setInfoVisibilityStatus( VisibilityStatus _infoVisibility )
{
infoVisibility = _infoVisibility;
}
/*
* s e t O u t p u t F i l e
*/
inline void MessageHandling::setOutputFile( myFILE* _outputFile )
{
outputFile = _outputFile;
}
/*
* s e t E r r o r C o u n t
*/
inline returnValue MessageHandling::setErrorCount( int _errorCount )
{
if ( _errorCount >= 0 )
{
errorCount = _errorCount;
return SUCCESSFUL_RETURN;
}
else
return RET_INVALID_ARGUMENTS;
}
/*
* end of file
*/
File diff suppressed because it is too large Load Diff
+299 -299
View File
@@ -1,299 +1,299 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/QProblem.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of inlined member functions of the QProblem class which
* is able to use the newly developed online active set strategy for
* parametric quadratic programming.
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t A
*/
inline returnValue QProblem::getA( real_t* const _A ) const
{
int i;
for ( i=0; i<getNV( )*getNC( ); ++i )
_A[i] = A[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t A
*/
inline returnValue QProblem::getA( int number, real_t* const row ) const
{
int nV = getNV( );
if ( ( number >= 0 ) && ( number < getNC( ) ) )
{
for ( int i=0; i<nV; ++i )
row[i] = A[number*NVMAX + i];
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* g e t L B A
*/
inline returnValue QProblem::getLBA( real_t* const _lbA ) const
{
int i;
for ( i=0; i<getNC( ); ++i )
_lbA[i] = lbA[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t L B A
*/
inline returnValue QProblem::getLBA( int number, real_t& value ) const
{
if ( ( number >= 0 ) && ( number < getNC( ) ) )
{
value = lbA[number];
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* g e t U B A
*/
inline returnValue QProblem::getUBA( real_t* const _ubA ) const
{
int i;
for ( i=0; i<getNC( ); ++i )
_ubA[i] = ubA[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t U B A
*/
inline returnValue QProblem::getUBA( int number, real_t& value ) const
{
if ( ( number >= 0 ) && ( number < getNC( ) ) )
{
value = ubA[number];
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* g e t C o n s t r a i n t s
*/
inline returnValue QProblem::getConstraints( Constraints* const _constraints ) const
{
*_constraints = constraints;
return SUCCESSFUL_RETURN;
}
/*
* g e t N C
*/
inline int QProblem::getNC( ) const
{
return constraints.getNC( );
}
/*
* g e t N E C
*/
inline int QProblem::getNEC( ) const
{
return constraints.getNEC( );
}
/*
* g e t N A C
*/
inline int QProblem::getNAC( )
{
return constraints.getNAC( );
}
/*
* g e t N I A C
*/
inline int QProblem::getNIAC( )
{
return constraints.getNIAC( );
}
/*****************************************************************************
* P R O T E C T E D *
*****************************************************************************/
/*
* s e t A
*/
inline returnValue QProblem::setA( const real_t* const A_new )
{
int i, j;
int nV = getNV( );
int nC = getNC( );
/* Set constraint matrix AND update member AX. */
for( j=0; j<nC; ++j )
{
Ax[j] = 0.0;
for( i=0; i<nV; ++i )
{
A[j*NVMAX + i] = A_new[j*nV + i];
Ax[j] += A[j*NVMAX + i] * x[i];
}
}
return SUCCESSFUL_RETURN;
}
/*
* s e t A
*/
inline returnValue QProblem::setA( int number, const real_t* const row )
{
int i;
int nV = getNV( );
/* Set constraint matrix AND update member AX. */
if ( ( number >= 0 ) && ( number < getNC( ) ) )
{
Ax[number] = 0.0;
for( i=0; i<nV; ++i )
{
A[number*NVMAX + i] = row[i];
Ax[number] += A[number*NVMAX + i] * x[i];
}
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* s e t L B A
*/
inline returnValue QProblem::setLBA( const real_t* const lbA_new )
{
int i;
int nC = getNC();
for( i=0; i<nC; ++i )
lbA[i] = lbA_new[i];
return SUCCESSFUL_RETURN;
}
/*
* s e t L B A
*/
inline returnValue QProblem::setLBA( int number, real_t value )
{
if ( ( number >= 0 ) && ( number < getNC( ) ) )
{
lbA[number] = value;
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* s e t U B A
*/
inline returnValue QProblem::setUBA( const real_t* const ubA_new )
{
int i;
int nC = getNC();
for( i=0; i<nC; ++i )
ubA[i] = ubA_new[i];
return SUCCESSFUL_RETURN;
}
/*
* s e t U B A
*/
inline returnValue QProblem::setUBA( int number, real_t value )
{
if ( ( number >= 0 ) && ( number < getNC( ) ) )
{
ubA[number] = value;
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/QProblem.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of inlined member functions of the QProblem class which
* is able to use the newly developed online active set strategy for
* parametric quadratic programming.
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t A
*/
inline returnValue QProblem::getA( real_t* const _A ) const
{
int i;
for ( i=0; i<getNV( )*getNC( ); ++i )
_A[i] = A[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t A
*/
inline returnValue QProblem::getA( int number, real_t* const row ) const
{
int nV = getNV( );
if ( ( number >= 0 ) && ( number < getNC( ) ) )
{
for ( int i=0; i<nV; ++i )
row[i] = A[number*NVMAX + i];
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* g e t L B A
*/
inline returnValue QProblem::getLBA( real_t* const _lbA ) const
{
int i;
for ( i=0; i<getNC( ); ++i )
_lbA[i] = lbA[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t L B A
*/
inline returnValue QProblem::getLBA( int number, real_t& value ) const
{
if ( ( number >= 0 ) && ( number < getNC( ) ) )
{
value = lbA[number];
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* g e t U B A
*/
inline returnValue QProblem::getUBA( real_t* const _ubA ) const
{
int i;
for ( i=0; i<getNC( ); ++i )
_ubA[i] = ubA[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t U B A
*/
inline returnValue QProblem::getUBA( int number, real_t& value ) const
{
if ( ( number >= 0 ) && ( number < getNC( ) ) )
{
value = ubA[number];
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* g e t C o n s t r a i n t s
*/
inline returnValue QProblem::getConstraints( Constraints* const _constraints ) const
{
*_constraints = constraints;
return SUCCESSFUL_RETURN;
}
/*
* g e t N C
*/
inline int QProblem::getNC( ) const
{
return constraints.getNC( );
}
/*
* g e t N E C
*/
inline int QProblem::getNEC( ) const
{
return constraints.getNEC( );
}
/*
* g e t N A C
*/
inline int QProblem::getNAC( )
{
return constraints.getNAC( );
}
/*
* g e t N I A C
*/
inline int QProblem::getNIAC( )
{
return constraints.getNIAC( );
}
/*****************************************************************************
* P R O T E C T E D *
*****************************************************************************/
/*
* s e t A
*/
inline returnValue QProblem::setA( const real_t* const A_new )
{
int i, j;
int nV = getNV( );
int nC = getNC( );
/* Set constraint matrix AND update member AX. */
for( j=0; j<nC; ++j )
{
Ax[j] = 0.0;
for( i=0; i<nV; ++i )
{
A[j*NVMAX + i] = A_new[j*nV + i];
Ax[j] += A[j*NVMAX + i] * x[i];
}
}
return SUCCESSFUL_RETURN;
}
/*
* s e t A
*/
inline returnValue QProblem::setA( int number, const real_t* const row )
{
int i;
int nV = getNV( );
/* Set constraint matrix AND update member AX. */
if ( ( number >= 0 ) && ( number < getNC( ) ) )
{
Ax[number] = 0.0;
for( i=0; i<nV; ++i )
{
A[number*NVMAX + i] = row[i];
Ax[number] += A[number*NVMAX + i] * x[i];
}
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* s e t L B A
*/
inline returnValue QProblem::setLBA( const real_t* const lbA_new )
{
int i;
int nC = getNC();
for( i=0; i<nC; ++i )
lbA[i] = lbA_new[i];
return SUCCESSFUL_RETURN;
}
/*
* s e t L B A
*/
inline returnValue QProblem::setLBA( int number, real_t value )
{
if ( ( number >= 0 ) && ( number < getNC( ) ) )
{
lbA[number] = value;
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* s e t U B A
*/
inline returnValue QProblem::setUBA( const real_t* const ubA_new )
{
int i;
int nC = getNC();
for( i=0; i<nC; ++i )
ubA[i] = ubA_new[i];
return SUCCESSFUL_RETURN;
}
/*
* s e t U B A
*/
inline returnValue QProblem::setUBA( int number, real_t value )
{
if ( ( number >= 0 ) && ( number < getNC( ) ) )
{
ubA[number] = value;
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* end of file
*/
File diff suppressed because it is too large Load Diff
+425 -425
View File
@@ -1,425 +1,425 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/QProblemB.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of inlined member functions of the QProblemB class which
* is able to use the newly developed online active set strategy for
* parametric quadratic programming.
*/
#include <math.h>
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t H
*/
inline returnValue QProblemB::getH( real_t* const _H ) const
{
int i;
for ( i=0; i<getNV( )*getNV( ); ++i )
_H[i] = H[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t G
*/
inline returnValue QProblemB::getG( real_t* const _g ) const
{
int i;
for ( i=0; i<getNV( ); ++i )
_g[i] = g[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t L B
*/
inline returnValue QProblemB::getLB( real_t* const _lb ) const
{
int i;
for ( i=0; i<getNV( ); ++i )
_lb[i] = lb[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t L B
*/
inline returnValue QProblemB::getLB( int number, real_t& value ) const
{
if ( ( number >= 0 ) && ( number < getNV( ) ) )
{
value = lb[number];
return SUCCESSFUL_RETURN;
}
else
{
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
}
/*
* g e t U B
*/
inline returnValue QProblemB::getUB( real_t* const _ub ) const
{
int i;
for ( i=0; i<getNV( ); ++i )
_ub[i] = ub[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t U B
*/
inline returnValue QProblemB::getUB( int number, real_t& value ) const
{
if ( ( number >= 0 ) && ( number < getNV( ) ) )
{
value = ub[number];
return SUCCESSFUL_RETURN;
}
else
{
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
}
/*
* g e t B o u n d s
*/
inline returnValue QProblemB::getBounds( Bounds* const _bounds ) const
{
*_bounds = bounds;
return SUCCESSFUL_RETURN;
}
/*
* g e t N V
*/
inline int QProblemB::getNV( ) const
{
return bounds.getNV( );
}
/*
* g e t N F R
*/
inline int QProblemB::getNFR( )
{
return bounds.getNFR( );
}
/*
* g e t N F X
*/
inline int QProblemB::getNFX( )
{
return bounds.getNFX( );
}
/*
* g e t N F V
*/
inline int QProblemB::getNFV( ) const
{
return bounds.getNFV( );
}
/*
* g e t S t a t u s
*/
inline QProblemStatus QProblemB::getStatus( ) const
{
return status;
}
/*
* i s I n i t i a l i s e d
*/
inline BooleanType QProblemB::isInitialised( ) const
{
if ( status == QPS_NOTINITIALISED )
return BT_FALSE;
else
return BT_TRUE;
}
/*
* i s S o l v e d
*/
inline BooleanType QProblemB::isSolved( ) const
{
if ( status == QPS_SOLVED )
return BT_TRUE;
else
return BT_FALSE;
}
/*
* i s I n f e a s i b l e
*/
inline BooleanType QProblemB::isInfeasible( ) const
{
return infeasible;
}
/*
* i s U n b o u n d e d
*/
inline BooleanType QProblemB::isUnbounded( ) const
{
return unbounded;
}
/*
* g e t P r i n t L e v e l
*/
inline PrintLevel QProblemB::getPrintLevel( ) const
{
return printlevel;
}
/*
* g e t H e s s i a n T y p e
*/
inline HessianType QProblemB::getHessianType( ) const
{
return hessianType;
}
/*
* s e t H e s s i a n T y p e
*/
inline returnValue QProblemB::setHessianType( HessianType _hessianType )
{
hessianType = _hessianType;
return SUCCESSFUL_RETURN;
}
/*****************************************************************************
* P R O T E C T E D *
*****************************************************************************/
/*
* s e t H
*/
inline returnValue QProblemB::setH( const real_t* const H_new )
{
int i, j;
int nV = getNV();
for( i=0; i<nV; ++i )
for( j=0; j<nV; ++j )
H[i*NVMAX + j] = H_new[i*nV + j];
return SUCCESSFUL_RETURN;
}
/*
* s e t G
*/
inline returnValue QProblemB::setG( const real_t* const g_new )
{
int i;
int nV = getNV();
for( i=0; i<nV; ++i )
g[i] = g_new[i];
return SUCCESSFUL_RETURN;
}
/*
* s e t L B
*/
inline returnValue QProblemB::setLB( const real_t* const lb_new )
{
int i;
int nV = getNV();
for( i=0; i<nV; ++i )
lb[i] = lb_new[i];
return SUCCESSFUL_RETURN;
}
/*
* s e t L B
*/
inline returnValue QProblemB::setLB( int number, real_t value )
{
if ( ( number >= 0 ) && ( number < getNV( ) ) )
{
lb[number] = value;
return SUCCESSFUL_RETURN;
}
else
{
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
}
/*
* s e t U B
*/
inline returnValue QProblemB::setUB( const real_t* const ub_new )
{
int i;
int nV = getNV();
for( i=0; i<nV; ++i )
ub[i] = ub_new[i];
return SUCCESSFUL_RETURN;
}
/*
* s e t U B
*/
inline returnValue QProblemB::setUB( int number, real_t value )
{
if ( ( number >= 0 ) && ( number < getNV( ) ) )
{
ub[number] = value;
return SUCCESSFUL_RETURN;
}
else
{
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
}
/*
* c o m p u t e G i v e n s
*/
inline void QProblemB::computeGivens( real_t xold, real_t yold, real_t& xnew, real_t& ynew,
real_t& c, real_t& s
) const
{
if ( getAbs( yold ) <= ZERO )
{
c = 1.0;
s = 0.0;
xnew = xold;
ynew = yold;
}
else
{
real_t t, mu;
mu = getAbs( xold );
if ( getAbs( yold ) > mu )
mu = getAbs( yold );
t = mu * sqrt( (xold/mu)*(xold/mu) + (yold/mu)*(yold/mu) );
if ( xold < 0.0 )
t = -t;
c = xold/t;
s = yold/t;
xnew = t;
ynew = 0.0;
}
return;
}
/*
* a p p l y G i v e n s
*/
inline void QProblemB::applyGivens( real_t c, real_t s, real_t xold, real_t yold,
real_t& xnew, real_t& ynew
) const
{
/* Usual Givens plane rotation requiring four multiplications. */
xnew = c*xold + s*yold;
ynew = -s*xold + c*yold;
// double nu = s/(1.0+c);
//
// xnew = xold*c + yold*s;
// ynew = (xnew+xold)*nu - yold;
return;
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/QProblemB.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of inlined member functions of the QProblemB class which
* is able to use the newly developed online active set strategy for
* parametric quadratic programming.
*/
#include <math.h>
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t H
*/
inline returnValue QProblemB::getH( real_t* const _H ) const
{
int i;
for ( i=0; i<getNV( )*getNV( ); ++i )
_H[i] = H[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t G
*/
inline returnValue QProblemB::getG( real_t* const _g ) const
{
int i;
for ( i=0; i<getNV( ); ++i )
_g[i] = g[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t L B
*/
inline returnValue QProblemB::getLB( real_t* const _lb ) const
{
int i;
for ( i=0; i<getNV( ); ++i )
_lb[i] = lb[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t L B
*/
inline returnValue QProblemB::getLB( int number, real_t& value ) const
{
if ( ( number >= 0 ) && ( number < getNV( ) ) )
{
value = lb[number];
return SUCCESSFUL_RETURN;
}
else
{
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
}
/*
* g e t U B
*/
inline returnValue QProblemB::getUB( real_t* const _ub ) const
{
int i;
for ( i=0; i<getNV( ); ++i )
_ub[i] = ub[i];
return SUCCESSFUL_RETURN;
}
/*
* g e t U B
*/
inline returnValue QProblemB::getUB( int number, real_t& value ) const
{
if ( ( number >= 0 ) && ( number < getNV( ) ) )
{
value = ub[number];
return SUCCESSFUL_RETURN;
}
else
{
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
}
/*
* g e t B o u n d s
*/
inline returnValue QProblemB::getBounds( Bounds* const _bounds ) const
{
*_bounds = bounds;
return SUCCESSFUL_RETURN;
}
/*
* g e t N V
*/
inline int QProblemB::getNV( ) const
{
return bounds.getNV( );
}
/*
* g e t N F R
*/
inline int QProblemB::getNFR( )
{
return bounds.getNFR( );
}
/*
* g e t N F X
*/
inline int QProblemB::getNFX( )
{
return bounds.getNFX( );
}
/*
* g e t N F V
*/
inline int QProblemB::getNFV( ) const
{
return bounds.getNFV( );
}
/*
* g e t S t a t u s
*/
inline QProblemStatus QProblemB::getStatus( ) const
{
return status;
}
/*
* i s I n i t i a l i s e d
*/
inline BooleanType QProblemB::isInitialised( ) const
{
if ( status == QPS_NOTINITIALISED )
return BT_FALSE;
else
return BT_TRUE;
}
/*
* i s S o l v e d
*/
inline BooleanType QProblemB::isSolved( ) const
{
if ( status == QPS_SOLVED )
return BT_TRUE;
else
return BT_FALSE;
}
/*
* i s I n f e a s i b l e
*/
inline BooleanType QProblemB::isInfeasible( ) const
{
return infeasible;
}
/*
* i s U n b o u n d e d
*/
inline BooleanType QProblemB::isUnbounded( ) const
{
return unbounded;
}
/*
* g e t P r i n t L e v e l
*/
inline PrintLevel QProblemB::getPrintLevel( ) const
{
return printlevel;
}
/*
* g e t H e s s i a n T y p e
*/
inline HessianType QProblemB::getHessianType( ) const
{
return hessianType;
}
/*
* s e t H e s s i a n T y p e
*/
inline returnValue QProblemB::setHessianType( HessianType _hessianType )
{
hessianType = _hessianType;
return SUCCESSFUL_RETURN;
}
/*****************************************************************************
* P R O T E C T E D *
*****************************************************************************/
/*
* s e t H
*/
inline returnValue QProblemB::setH( const real_t* const H_new )
{
int i, j;
int nV = getNV();
for( i=0; i<nV; ++i )
for( j=0; j<nV; ++j )
H[i*NVMAX + j] = H_new[i*nV + j];
return SUCCESSFUL_RETURN;
}
/*
* s e t G
*/
inline returnValue QProblemB::setG( const real_t* const g_new )
{
int i;
int nV = getNV();
for( i=0; i<nV; ++i )
g[i] = g_new[i];
return SUCCESSFUL_RETURN;
}
/*
* s e t L B
*/
inline returnValue QProblemB::setLB( const real_t* const lb_new )
{
int i;
int nV = getNV();
for( i=0; i<nV; ++i )
lb[i] = lb_new[i];
return SUCCESSFUL_RETURN;
}
/*
* s e t L B
*/
inline returnValue QProblemB::setLB( int number, real_t value )
{
if ( ( number >= 0 ) && ( number < getNV( ) ) )
{
lb[number] = value;
return SUCCESSFUL_RETURN;
}
else
{
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
}
/*
* s e t U B
*/
inline returnValue QProblemB::setUB( const real_t* const ub_new )
{
int i;
int nV = getNV();
for( i=0; i<nV; ++i )
ub[i] = ub_new[i];
return SUCCESSFUL_RETURN;
}
/*
* s e t U B
*/
inline returnValue QProblemB::setUB( int number, real_t value )
{
if ( ( number >= 0 ) && ( number < getNV( ) ) )
{
ub[number] = value;
return SUCCESSFUL_RETURN;
}
else
{
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
}
/*
* c o m p u t e G i v e n s
*/
inline void QProblemB::computeGivens( real_t xold, real_t yold, real_t& xnew, real_t& ynew,
real_t& c, real_t& s
) const
{
if ( getAbs( yold ) <= ZERO )
{
c = 1.0;
s = 0.0;
xnew = xold;
ynew = yold;
}
else
{
real_t t, mu;
mu = getAbs( xold );
if ( getAbs( yold ) > mu )
mu = getAbs( yold );
t = mu * sqrt( (xold/mu)*(xold/mu) + (yold/mu)*(yold/mu) );
if ( xold < 0.0 )
t = -t;
c = xold/t;
s = yold/t;
xnew = t;
ynew = 0.0;
}
return;
}
/*
* a p p l y G i v e n s
*/
inline void QProblemB::applyGivens( real_t c, real_t s, real_t xold, real_t yold,
real_t& xnew, real_t& ynew
) const
{
/* Usual Givens plane rotation requiring four multiplications. */
xnew = c*xold + s*yold;
ynew = -s*xold + c*yold;
// double nu = s/(1.0+c);
//
// xnew = xold*c + yold*s;
// ynew = (xnew+xold)*nu - yold;
return;
}
/*
* end of file
*/
+200 -200
View File
@@ -1,200 +1,200 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/SubjectTo.cpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of the SubjectTo class designed to manage working sets of
* constraints and bounds within a QProblem.
*/
#include <SubjectTo.hpp>
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* S u b j e c t T o
*/
SubjectTo::SubjectTo( ) : noLower( BT_TRUE ),
noUpper( BT_TRUE ),
size( 0 )
{
int i;
for( i=0; i<size; ++i )
{
type[i] = ST_UNKNOWN;
status[i] = ST_UNDEFINED;
}
}
/*
* S u b j e c t T o
*/
SubjectTo::SubjectTo( const SubjectTo& rhs ) : noLower( rhs.noLower ),
noUpper( rhs.noUpper ),
size( rhs.size )
{
int i;
for( i=0; i<size; ++i )
{
type[i] = rhs.type[i];
status[i] = rhs.status[i];
}
}
/*
* ~ S u b j e c t T o
*/
SubjectTo::~SubjectTo( )
{
}
/*
* o p e r a t o r =
*/
SubjectTo& SubjectTo::operator=( const SubjectTo& rhs )
{
int i;
if ( this != &rhs )
{
size = rhs.size;
for( i=0; i<size; ++i )
{
type[i] = rhs.type[i];
status[i] = rhs.status[i];
}
noLower = rhs.noLower;
noUpper = rhs.noUpper;
}
return *this;
}
/*
* i n i t
*/
returnValue SubjectTo::init( int n )
{
int i;
size = n;
noLower = BT_TRUE;
noUpper = BT_TRUE;
for( i=0; i<size; ++i )
{
type[i] = ST_UNKNOWN;
status[i] = ST_UNDEFINED;
}
return SUCCESSFUL_RETURN;
}
/*****************************************************************************
* P R O T E C T E D *
*****************************************************************************/
/*
* a d d I n d e x
*/
returnValue SubjectTo::addIndex( Indexlist* const indexlist,
int newnumber, SubjectToStatus newstatus
)
{
/* consistency check */
if ( status[newnumber] == newstatus )
return THROWERROR( RET_INDEX_ALREADY_OF_DESIRED_STATUS );
status[newnumber] = newstatus;
if ( indexlist->addNumber( newnumber ) == RET_INDEXLIST_EXCEEDS_MAX_LENGTH )
return THROWERROR( RET_ADDINDEX_FAILED );
return SUCCESSFUL_RETURN;
}
/*
* r e m o v e I n d e x
*/
returnValue SubjectTo::removeIndex( Indexlist* const indexlist,
int removenumber
)
{
status[removenumber] = ST_UNDEFINED;
if ( indexlist->removeNumber( removenumber ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_UNKNOWN_BUG );
return SUCCESSFUL_RETURN;
}
/*
* s w a p I n d e x
*/
returnValue SubjectTo::swapIndex( Indexlist* const indexlist,
int number1, int number2
)
{
/* consistency checks */
if ( status[number1] != status[number2] )
return THROWERROR( RET_SWAPINDEX_FAILED );
if ( number1 == number2 )
{
THROWWARNING( RET_NOTHING_TO_DO );
return SUCCESSFUL_RETURN;
}
if ( indexlist->swapNumbers( number1,number2 ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SWAPINDEX_FAILED );
return SUCCESSFUL_RETURN;
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/SubjectTo.cpp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of the SubjectTo class designed to manage working sets of
* constraints and bounds within a QProblem.
*/
#include <SubjectTo.hpp>
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* S u b j e c t T o
*/
SubjectTo::SubjectTo( ) : noLower( BT_TRUE ),
noUpper( BT_TRUE ),
size( 0 )
{
int i;
for( i=0; i<size; ++i )
{
type[i] = ST_UNKNOWN;
status[i] = ST_UNDEFINED;
}
}
/*
* S u b j e c t T o
*/
SubjectTo::SubjectTo( const SubjectTo& rhs ) : noLower( rhs.noLower ),
noUpper( rhs.noUpper ),
size( rhs.size )
{
int i;
for( i=0; i<size; ++i )
{
type[i] = rhs.type[i];
status[i] = rhs.status[i];
}
}
/*
* ~ S u b j e c t T o
*/
SubjectTo::~SubjectTo( )
{
}
/*
* o p e r a t o r =
*/
SubjectTo& SubjectTo::operator=( const SubjectTo& rhs )
{
int i;
if ( this != &rhs )
{
size = rhs.size;
for( i=0; i<size; ++i )
{
type[i] = rhs.type[i];
status[i] = rhs.status[i];
}
noLower = rhs.noLower;
noUpper = rhs.noUpper;
}
return *this;
}
/*
* i n i t
*/
returnValue SubjectTo::init( int n )
{
int i;
size = n;
noLower = BT_TRUE;
noUpper = BT_TRUE;
for( i=0; i<size; ++i )
{
type[i] = ST_UNKNOWN;
status[i] = ST_UNDEFINED;
}
return SUCCESSFUL_RETURN;
}
/*****************************************************************************
* P R O T E C T E D *
*****************************************************************************/
/*
* a d d I n d e x
*/
returnValue SubjectTo::addIndex( Indexlist* const indexlist,
int newnumber, SubjectToStatus newstatus
)
{
/* consistency check */
if ( status[newnumber] == newstatus )
return THROWERROR( RET_INDEX_ALREADY_OF_DESIRED_STATUS );
status[newnumber] = newstatus;
if ( indexlist->addNumber( newnumber ) == RET_INDEXLIST_EXCEEDS_MAX_LENGTH )
return THROWERROR( RET_ADDINDEX_FAILED );
return SUCCESSFUL_RETURN;
}
/*
* r e m o v e I n d e x
*/
returnValue SubjectTo::removeIndex( Indexlist* const indexlist,
int removenumber
)
{
status[removenumber] = ST_UNDEFINED;
if ( indexlist->removeNumber( removenumber ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_UNKNOWN_BUG );
return SUCCESSFUL_RETURN;
}
/*
* s w a p I n d e x
*/
returnValue SubjectTo::swapIndex( Indexlist* const indexlist,
int number1, int number2
)
{
/* consistency checks */
if ( status[number1] != status[number2] )
return THROWERROR( RET_SWAPINDEX_FAILED );
if ( number1 == number2 )
{
THROWWARNING( RET_NOTHING_TO_DO );
return SUCCESSFUL_RETURN;
}
if ( indexlist->swapNumbers( number1,number2 ) != SUCCESSFUL_RETURN )
return THROWERROR( RET_SWAPINDEX_FAILED );
return SUCCESSFUL_RETURN;
}
/*
* end of file
*/
+132 -132
View File
@@ -1,132 +1,132 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/SubjectTo.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of the inlined member functions of the SubjectTo class
* designed to manage working sets of constraints and bounds within a QProblem.
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t T y p e
*/
inline SubjectToType SubjectTo::getType( int i ) const
{
if ( ( i >= 0 ) && ( i < size ) )
return type[i];
else
return ST_UNKNOWN;
}
/*
* g e t S t a t u s
*/
inline SubjectToStatus SubjectTo::getStatus( int i ) const
{
if ( ( i >= 0 ) && ( i < size ) )
return status[i];
else
return ST_UNDEFINED;
}
/*
* s e t T y p e
*/
inline returnValue SubjectTo::setType( int i, SubjectToType value )
{
if ( ( i >= 0 ) && ( i < size ) )
{
type[i] = value;
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* s e t S t a t u s
*/
inline returnValue SubjectTo::setStatus( int i, SubjectToStatus value )
{
if ( ( i >= 0 ) && ( i < size ) )
{
status[i] = value;
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* s e t N o L o w e r
*/
inline void SubjectTo::setNoLower( BooleanType _status )
{
noLower = _status;
}
/*
* s e t N o U p p e r
*/
inline void SubjectTo::setNoUpper( BooleanType _status )
{
noUpper = _status;
}
/*
* i s N o L o w e r
*/
inline BooleanType SubjectTo::isNoLower( ) const
{
return noLower;
}
/*
* i s N o L o w e r
*/
inline BooleanType SubjectTo::isNoUpper( ) const
{
return noUpper;
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/SubjectTo.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of the inlined member functions of the SubjectTo class
* designed to manage working sets of constraints and bounds within a QProblem.
*/
/*****************************************************************************
* P U B L I C *
*****************************************************************************/
/*
* g e t T y p e
*/
inline SubjectToType SubjectTo::getType( int i ) const
{
if ( ( i >= 0 ) && ( i < size ) )
return type[i];
else
return ST_UNKNOWN;
}
/*
* g e t S t a t u s
*/
inline SubjectToStatus SubjectTo::getStatus( int i ) const
{
if ( ( i >= 0 ) && ( i < size ) )
return status[i];
else
return ST_UNDEFINED;
}
/*
* s e t T y p e
*/
inline returnValue SubjectTo::setType( int i, SubjectToType value )
{
if ( ( i >= 0 ) && ( i < size ) )
{
type[i] = value;
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* s e t S t a t u s
*/
inline returnValue SubjectTo::setStatus( int i, SubjectToStatus value )
{
if ( ( i >= 0 ) && ( i < size ) )
{
status[i] = value;
return SUCCESSFUL_RETURN;
}
else
return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
}
/*
* s e t N o L o w e r
*/
inline void SubjectTo::setNoLower( BooleanType _status )
{
noLower = _status;
}
/*
* s e t N o U p p e r
*/
inline void SubjectTo::setNoUpper( BooleanType _status )
{
noUpper = _status;
}
/*
* i s N o L o w e r
*/
inline BooleanType SubjectTo::isNoLower( ) const
{
return noLower;
}
/*
* i s N o L o w e r
*/
inline BooleanType SubjectTo::isNoUpper( ) const
{
return noUpper;
}
/*
* end of file
*/
+471 -471
View File
@@ -1,471 +1,471 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Utils.cpp
* \author Hans Joachim Ferreau, Eckhard Arnold
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of some inlined utilities for working with the different QProblem
* classes.
*/
#include <math.h>
#if defined(__WIN32__) || defined(WIN32)
#include <windows.h>
#elif defined(LINUX)
#include <sys/stat.h>
#include <sys/time.h>
#endif
#ifdef __MATLAB__
#include <mex.h>
#endif
#include <Utils.hpp>
#ifdef PC_DEBUG /* Define print functions only for debugging! */
/*
* p r i n t
*/
returnValue print( const real_t* const v, int n )
{
int i;
char myPrintfString[160];
/* Print a vector. */
myPrintf( "[\t" );
for( i=0; i<n; ++i )
{
sprintf( myPrintfString," %.16e\t", v[i] );
myPrintf( myPrintfString );
}
myPrintf( "]\n" );
return SUCCESSFUL_RETURN;
}
/*
* p r i n t
*/
returnValue print( const real_t* const v, int n,
const int* const V_idx
)
{
int i;
char myPrintfString[160];
/* Print a permuted vector. */
myPrintf( "[\t" );
for( i=0; i<n; ++i )
{
sprintf( myPrintfString," %.16e\t", v[ V_idx[i] ] );
myPrintf( myPrintfString );
}
myPrintf( "]\n" );
return SUCCESSFUL_RETURN;
}
/*
* p r i n t
*/
returnValue print( const real_t* const v, int n,
const char* name
)
{
char myPrintfString[160];
/* Print vector name ... */
sprintf( myPrintfString,"%s = ", name );
myPrintf( myPrintfString );
/* ... and the vector itself. */
return print( v, n );
}
/*
* p r i n t
*/
returnValue print( const real_t* const M, int nrow, int ncol )
{
int i;
/* Print a matrix as a collection of row vectors. */
for( i=0; i<nrow; ++i )
print( &(M[i*ncol]), ncol );
myPrintf( "\n" );
return SUCCESSFUL_RETURN;
}
/*
* p r i n t
*/
returnValue print( const real_t* const M, int nrow, int ncol,
const int* const ROW_idx, const int* const COL_idx
)
{
int i;
/* Print a permuted matrix as a collection of permuted row vectors. */
for( i=0; i<nrow; ++i )
print( &( M[ ROW_idx[i]*ncol ] ), ncol, COL_idx );
myPrintf( "\n" );
return SUCCESSFUL_RETURN;
}
/*
* p r i n t
*/
returnValue print( const real_t* const M, int nrow, int ncol,
const char* name
)
{
char myPrintfString[160];
/* Print matrix name ... */
sprintf( myPrintfString,"%s = ", name );
myPrintf( myPrintfString );
/* ... and the matrix itself. */
return print( M, nrow, ncol );
}
/*
* p r i n t
*/
returnValue print( const int* const index, int n )
{
int i;
char myPrintfString[160];
/* Print a indexlist. */
myPrintf( "[\t" );
for( i=0; i<n; ++i )
{
sprintf( myPrintfString," %d\t", index[i] );
myPrintf( myPrintfString );
}
myPrintf( "]\n" );
return SUCCESSFUL_RETURN;
}
/*
* p r i n t
*/
returnValue print( const int* const index, int n,
const char* name
)
{
char myPrintfString[160];
/* Print indexlist name ... */
sprintf( myPrintfString,"%s = ", name );
myPrintf( myPrintfString );
/* ... and the indexlist itself. */
return print( index, n );
}
/*
* m y P r i n t f
*/
returnValue myPrintf( const char* s )
{
#ifdef __MATLAB__
mexPrintf( s );
#else
myFILE* outputfile = getGlobalMessageHandler( )->getOutputFile( );
if ( outputfile == 0 )
return THROWERROR( RET_NO_GLOBAL_MESSAGE_OUTPUTFILE );
fprintf( outputfile, "%s", s );
#endif
return SUCCESSFUL_RETURN;
}
/*
* p r i n t C o p y r i g h t N o t i c e
*/
returnValue printCopyrightNotice( )
{
return myPrintf( "\nqpOASES -- An Implementation of the Online Active Set Strategy.\nCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\n\nqpOASES is distributed under the terms of the \nGNU Lesser General Public License 2.1 in the hope that it will be \nuseful, but WITHOUT ANY WARRANTY; without even the implied warranty \nof MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \nSee the GNU Lesser General Public License for more details.\n\n" );
}
/*
* r e a d F r o m F i l e
*/
returnValue readFromFile( real_t* data, int nrow, int ncol,
const char* datafilename
)
{
int i, j;
float float_data;
myFILE* datafile;
/* 1) Open file. */
if ( ( datafile = fopen( datafilename, "r" ) ) == 0 )
{
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
/* 2) Read data from file. */
for( i=0; i<nrow; ++i )
{
for( j=0; j<ncol; ++j )
{
if ( fscanf( datafile, "%f ", &float_data ) == 0 )
{
fclose( datafile );
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_READ_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
data[i*ncol + j] = ( (real_t) float_data );
}
}
/* 3) Close file. */
fclose( datafile );
return SUCCESSFUL_RETURN;
}
/*
* r e a d F r o m F i l e
*/
returnValue readFromFile( real_t* data, int n,
const char* datafilename
)
{
return readFromFile( data, n, 1, datafilename );
}
/*
* r e a d F r o m F i l e
*/
returnValue readFromFile( int* data, int n,
const char* datafilename
)
{
int i;
myFILE* datafile;
/* 1) Open file. */
if ( ( datafile = fopen( datafilename, "r" ) ) == 0 )
{
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
/* 2) Read data from file. */
for( i=0; i<n; ++i )
{
if ( fscanf( datafile, "%d\n", &(data[i]) ) == 0 )
{
fclose( datafile );
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_READ_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
}
/* 3) Close file. */
fclose( datafile );
return SUCCESSFUL_RETURN;
}
/*
* w r i t e I n t o F i l e
*/
returnValue writeIntoFile( const real_t* const data, int nrow, int ncol,
const char* datafilename, BooleanType append
)
{
int i, j;
myFILE* datafile;
/* 1) Open file. */
if ( append == BT_TRUE )
{
/* append data */
if ( ( datafile = fopen( datafilename, "a" ) ) == 0 )
{
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
}
else
{
/* do not append data */
if ( ( datafile = fopen( datafilename, "w" ) ) == 0 )
{
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
}
/* 2) Write data into file. */
for( i=0; i<nrow; ++i )
{
for( j=0; j<ncol; ++j )
fprintf( datafile, "%.16e ", data[i*ncol+j] );
fprintf( datafile, "\n" );
}
/* 3) Close file. */
fclose( datafile );
return SUCCESSFUL_RETURN;
}
/*
* w r i t e I n t o F i l e
*/
returnValue writeIntoFile( const real_t* const data, int n,
const char* datafilename, BooleanType append
)
{
return writeIntoFile( data,1,n,datafilename,append );
}
/*
* w r i t e I n t o F i l e
*/
returnValue writeIntoFile( const int* const data, int n,
const char* datafilename, BooleanType append
)
{
int i;
myFILE* datafile;
/* 1) Open file. */
if ( append == BT_TRUE )
{
/* append data */
if ( ( datafile = fopen( datafilename, "a" ) ) == 0 )
{
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
}
else
{
/* do not append data */
if ( ( datafile = fopen( datafilename, "w" ) ) == 0 )
{
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
}
/* 2) Write data into file. */
for( i=0; i<n; ++i )
fprintf( datafile, "%d\n", data[i] );
/* 3) Close file. */
fclose( datafile );
return SUCCESSFUL_RETURN;
}
#endif /* PC_DEBUG */
/*
* g e t C P U t i m e
*/
real_t getCPUtime( )
{
real_t current_time = -1.0;
#if defined(__WIN32__) || defined(WIN32)
LARGE_INTEGER counter, frequency;
QueryPerformanceFrequency(&frequency);
QueryPerformanceCounter(&counter);
current_time = ((real_t) counter.QuadPart) / ((real_t) frequency.QuadPart);
#elif defined(LINUX)
struct timeval theclock;
gettimeofday( &theclock,0 );
current_time = 1.0*theclock.tv_sec + 1.0e-6*theclock.tv_usec;
#endif
return current_time;
}
/*
* g e t N o r m
*/
real_t getNorm( const real_t* const v, int n )
{
int i;
real_t norm = 0.0;
for( i=0; i<n; ++i )
norm += v[i]*v[i];
return sqrt( norm );
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Utils.cpp
* \author Hans Joachim Ferreau, Eckhard Arnold
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of some inlined utilities for working with the different QProblem
* classes.
*/
#include <math.h>
#if defined(__WIN32__) || defined(WIN32)
#include <windows.h>
#elif defined(LINUX)
#include <sys/stat.h>
#include <sys/time.h>
#endif
#ifdef __MATLAB__
#include <mex.h>
#endif
#include <Utils.hpp>
#ifdef PC_DEBUG /* Define print functions only for debugging! */
/*
* p r i n t
*/
returnValue print( const real_t* const v, int n )
{
int i;
char myPrintfString[160];
/* Print a vector. */
myPrintf( "[\t" );
for( i=0; i<n; ++i )
{
sprintf( myPrintfString," %.16e\t", v[i] );
myPrintf( myPrintfString );
}
myPrintf( "]\n" );
return SUCCESSFUL_RETURN;
}
/*
* p r i n t
*/
returnValue print( const real_t* const v, int n,
const int* const V_idx
)
{
int i;
char myPrintfString[160];
/* Print a permuted vector. */
myPrintf( "[\t" );
for( i=0; i<n; ++i )
{
sprintf( myPrintfString," %.16e\t", v[ V_idx[i] ] );
myPrintf( myPrintfString );
}
myPrintf( "]\n" );
return SUCCESSFUL_RETURN;
}
/*
* p r i n t
*/
returnValue print( const real_t* const v, int n,
const char* name
)
{
char myPrintfString[160];
/* Print vector name ... */
sprintf( myPrintfString,"%s = ", name );
myPrintf( myPrintfString );
/* ... and the vector itself. */
return print( v, n );
}
/*
* p r i n t
*/
returnValue print( const real_t* const M, int nrow, int ncol )
{
int i;
/* Print a matrix as a collection of row vectors. */
for( i=0; i<nrow; ++i )
print( &(M[i*ncol]), ncol );
myPrintf( "\n" );
return SUCCESSFUL_RETURN;
}
/*
* p r i n t
*/
returnValue print( const real_t* const M, int nrow, int ncol,
const int* const ROW_idx, const int* const COL_idx
)
{
int i;
/* Print a permuted matrix as a collection of permuted row vectors. */
for( i=0; i<nrow; ++i )
print( &( M[ ROW_idx[i]*ncol ] ), ncol, COL_idx );
myPrintf( "\n" );
return SUCCESSFUL_RETURN;
}
/*
* p r i n t
*/
returnValue print( const real_t* const M, int nrow, int ncol,
const char* name
)
{
char myPrintfString[160];
/* Print matrix name ... */
sprintf( myPrintfString,"%s = ", name );
myPrintf( myPrintfString );
/* ... and the matrix itself. */
return print( M, nrow, ncol );
}
/*
* p r i n t
*/
returnValue print( const int* const index, int n )
{
int i;
char myPrintfString[160];
/* Print a indexlist. */
myPrintf( "[\t" );
for( i=0; i<n; ++i )
{
sprintf( myPrintfString," %d\t", index[i] );
myPrintf( myPrintfString );
}
myPrintf( "]\n" );
return SUCCESSFUL_RETURN;
}
/*
* p r i n t
*/
returnValue print( const int* const index, int n,
const char* name
)
{
char myPrintfString[160];
/* Print indexlist name ... */
sprintf( myPrintfString,"%s = ", name );
myPrintf( myPrintfString );
/* ... and the indexlist itself. */
return print( index, n );
}
/*
* m y P r i n t f
*/
returnValue myPrintf( const char* s )
{
#ifdef __MATLAB__
mexPrintf( s );
#else
myFILE* outputfile = getGlobalMessageHandler( )->getOutputFile( );
if ( outputfile == 0 )
return THROWERROR( RET_NO_GLOBAL_MESSAGE_OUTPUTFILE );
fprintf( outputfile, "%s", s );
#endif
return SUCCESSFUL_RETURN;
}
/*
* p r i n t C o p y r i g h t N o t i c e
*/
returnValue printCopyrightNotice( )
{
return myPrintf( "\nqpOASES -- An Implementation of the Online Active Set Strategy.\nCopyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.\n\nqpOASES is distributed under the terms of the \nGNU Lesser General Public License 2.1 in the hope that it will be \nuseful, but WITHOUT ANY WARRANTY; without even the implied warranty \nof MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \nSee the GNU Lesser General Public License for more details.\n\n" );
}
/*
* r e a d F r o m F i l e
*/
returnValue readFromFile( real_t* data, int nrow, int ncol,
const char* datafilename
)
{
int i, j;
float float_data;
myFILE* datafile;
/* 1) Open file. */
if ( ( datafile = fopen( datafilename, "r" ) ) == 0 )
{
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
/* 2) Read data from file. */
for( i=0; i<nrow; ++i )
{
for( j=0; j<ncol; ++j )
{
if ( fscanf( datafile, "%f ", &float_data ) == 0 )
{
fclose( datafile );
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_READ_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
data[i*ncol + j] = ( (real_t) float_data );
}
}
/* 3) Close file. */
fclose( datafile );
return SUCCESSFUL_RETURN;
}
/*
* r e a d F r o m F i l e
*/
returnValue readFromFile( real_t* data, int n,
const char* datafilename
)
{
return readFromFile( data, n, 1, datafilename );
}
/*
* r e a d F r o m F i l e
*/
returnValue readFromFile( int* data, int n,
const char* datafilename
)
{
int i;
myFILE* datafile;
/* 1) Open file. */
if ( ( datafile = fopen( datafilename, "r" ) ) == 0 )
{
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
/* 2) Read data from file. */
for( i=0; i<n; ++i )
{
if ( fscanf( datafile, "%d\n", &(data[i]) ) == 0 )
{
fclose( datafile );
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_READ_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
}
/* 3) Close file. */
fclose( datafile );
return SUCCESSFUL_RETURN;
}
/*
* w r i t e I n t o F i l e
*/
returnValue writeIntoFile( const real_t* const data, int nrow, int ncol,
const char* datafilename, BooleanType append
)
{
int i, j;
myFILE* datafile;
/* 1) Open file. */
if ( append == BT_TRUE )
{
/* append data */
if ( ( datafile = fopen( datafilename, "a" ) ) == 0 )
{
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
}
else
{
/* do not append data */
if ( ( datafile = fopen( datafilename, "w" ) ) == 0 )
{
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
}
/* 2) Write data into file. */
for( i=0; i<nrow; ++i )
{
for( j=0; j<ncol; ++j )
fprintf( datafile, "%.16e ", data[i*ncol+j] );
fprintf( datafile, "\n" );
}
/* 3) Close file. */
fclose( datafile );
return SUCCESSFUL_RETURN;
}
/*
* w r i t e I n t o F i l e
*/
returnValue writeIntoFile( const real_t* const data, int n,
const char* datafilename, BooleanType append
)
{
return writeIntoFile( data,1,n,datafilename,append );
}
/*
* w r i t e I n t o F i l e
*/
returnValue writeIntoFile( const int* const data, int n,
const char* datafilename, BooleanType append
)
{
int i;
myFILE* datafile;
/* 1) Open file. */
if ( append == BT_TRUE )
{
/* append data */
if ( ( datafile = fopen( datafilename, "a" ) ) == 0 )
{
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
}
else
{
/* do not append data */
if ( ( datafile = fopen( datafilename, "w" ) ) == 0 )
{
char errstr[80];
sprintf( errstr,"(%s)",datafilename );
return getGlobalMessageHandler( )->throwError( RET_UNABLE_TO_OPEN_FILE,errstr,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
}
}
/* 2) Write data into file. */
for( i=0; i<n; ++i )
fprintf( datafile, "%d\n", data[i] );
/* 3) Close file. */
fclose( datafile );
return SUCCESSFUL_RETURN;
}
#endif /* PC_DEBUG */
/*
* g e t C P U t i m e
*/
real_t getCPUtime( )
{
real_t current_time = -1.0;
#if defined(__WIN32__) || defined(WIN32)
LARGE_INTEGER counter, frequency;
QueryPerformanceFrequency(&frequency);
QueryPerformanceCounter(&counter);
current_time = ((real_t) counter.QuadPart) / ((real_t) frequency.QuadPart);
#elif defined(LINUX)
struct timeval theclock;
gettimeofday( &theclock,0 );
current_time = 1.0*theclock.tv_sec + 1.0e-6*theclock.tv_usec;
#endif
return current_time;
}
/*
* g e t N o r m
*/
real_t getNorm( const real_t* const v, int n )
{
int i;
real_t norm = 0.0;
for( i=0; i<n; ++i )
norm += v[i]*v[i];
return sqrt( norm );
}
/*
* end of file
*/
+51 -51
View File
@@ -1,51 +1,51 @@
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Utils.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of some inlined utilities for working with the different QProblem
* classes.
*/
/*
* g e t A b s
*/
inline real_t getAbs( real_t x )
{
if ( x < 0.0 )
return -x;
else
return x;
}
/*
* end of file
*/
/*
* This file is part of qpOASES.
*
* qpOASES -- An Implementation of the Online Active Set Strategy.
* Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
*
* qpOASES is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* qpOASES is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with qpOASES; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* \file SRC/Utils.ipp
* \author Hans Joachim Ferreau
* \version 1.3embedded
* \date 2007-2008
*
* Implementation of some inlined utilities for working with the different QProblem
* classes.
*/
/*
* g e t A b s
*/
inline real_t getAbs( real_t x )
{
if ( x < 0.0 )
return -x;
else
return x;
}
/*
* end of file
*/
+87 -87
View File
@@ -1,87 +1,87 @@
##
## qpOASES -- An Implementation of the Online Active Set Strategy.
## Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
##
## qpOASES is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## qpOASES is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with qpOASES; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
##
VERSION HISTORY
===============
1.3embedded (last updated on 30th April 2009):
-----------------------------------------------------------------------
+ Re-programming of internal memory management to avoid dynamic memory allocations
+ Most #ifdef directives removed
+ Almost all type definitions gathered within INCLUDE/Types.hpp
+ Irrelevant functionality removed (like the SQProblem class, functionality
for loading data from files or the SCILAB interface)
+ Replacement of all doubles by real_t
+ Introduction of define "PC_DEBUG" for switching off all print functions
+ stdio.h was made optional, string.h is no longer needed
+ relative paths removed from #include directives
+ made auxiliary objects locally static within solveInitialQP()
+ Matlab interface fixed for single precision
+ New return value -2 from Legacy wrapper added to Matlab/Simulink interfaces
+ KKT optimality check moved into QProblem(B) class, SolutionAnalysis class removed
1.3 (released on 2nd June 2008, last updated on 19th June 2008):
-----------------------------------------------------------------------
+ Implementation of "initialised homotopy" concept
+ Addition of the SolutionAnalysis class
+ Utility functions for solving test problems in OQP format added
+ Flexibility of Matlab(R) interface enhanced
+ Major source code cleanup
(Attention: a few class names and calling interfaces have changed!)
1.2 (released on 9th October 2007):
-----------------------------------------------------------------------
+ Special treatment of diagonal Hessians
+ Improved infeasibility detection
+ Further improved Matlab(R) interface
+ Extended Simulink(R) interface
+ scilab interface added
+ Code cleanup and several bugfixes
1.1 (released on 8th July 2007):
--------------------------------
+ Implementation of the QProblemB class
+ Basic implementation of the SQProblem class
+ Improved Matlab(R) interface
+ Enabling/Disabling of constraints introduced
+ Several bugfixes
1.0 (released on 17th April 2007):
----------------------------------
Initial release.
##
## end of file
##
##
## qpOASES -- An Implementation of the Online Active Set Strategy.
## Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
##
## qpOASES is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your option) any later version.
##
## qpOASES is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public
## License along with qpOASES; if not, write to the Free Software
## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
##
VERSION HISTORY
===============
1.3embedded (last updated on 30th April 2009):
-----------------------------------------------------------------------
+ Re-programming of internal memory management to avoid dynamic memory allocations
+ Most #ifdef directives removed
+ Almost all type definitions gathered within INCLUDE/Types.hpp
+ Irrelevant functionality removed (like the SQProblem class, functionality
for loading data from files or the SCILAB interface)
+ Replacement of all doubles by real_t
+ Introduction of define "PC_DEBUG" for switching off all print functions
+ stdio.h was made optional, string.h is no longer needed
+ relative paths removed from #include directives
+ made auxiliary objects locally static within solveInitialQP()
+ Matlab interface fixed for single precision
+ New return value -2 from Legacy wrapper added to Matlab/Simulink interfaces
+ KKT optimality check moved into QProblem(B) class, SolutionAnalysis class removed
1.3 (released on 2nd June 2008, last updated on 19th June 2008):
-----------------------------------------------------------------------
+ Implementation of "initialised homotopy" concept
+ Addition of the SolutionAnalysis class
+ Utility functions for solving test problems in OQP format added
+ Flexibility of Matlab(R) interface enhanced
+ Major source code cleanup
(Attention: a few class names and calling interfaces have changed!)
1.2 (released on 9th October 2007):
-----------------------------------------------------------------------
+ Special treatment of diagonal Hessians
+ Improved infeasibility detection
+ Further improved Matlab(R) interface
+ Extended Simulink(R) interface
+ scilab interface added
+ Code cleanup and several bugfixes
1.1 (released on 8th July 2007):
--------------------------------
+ Implementation of the QProblemB class
+ Basic implementation of the SQProblem class
+ Improved Matlab(R) interface
+ Enabling/Disabling of constraints introduced
+ Several bugfixes
1.0 (released on 17th April 2007):
----------------------------------
Initial release.
##
## end of file
##
Binary file not shown.
Binary file not shown.
-19
View File
@@ -1,19 +0,0 @@
Copyright (c) 2008-2015 Jesse Beder.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -1,17 +0,0 @@
#ifndef ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if defined(_MSC_VER) || \
(defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
(__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
#include <cstddef>
namespace YAML {
typedef std::size_t anchor_t;
const anchor_t NullAnchor = 0;
}
#endif // ANCHOR_H_62B23520_7C8E_11DE_8A39_0800200C9A66
@@ -1,67 +0,0 @@
#ifndef BASE64_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define BASE64_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if defined(_MSC_VER) || \
(defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
(__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
#include <string>
#include <vector>
#include "yaml-cpp/dll.h"
namespace YAML {
YAML_CPP_API std::string EncodeBase64(const unsigned char *data,
std::size_t size);
YAML_CPP_API std::vector<unsigned char> DecodeBase64(const std::string &input);
class YAML_CPP_API Binary {
public:
Binary() : m_unownedData(0), m_unownedSize(0) {}
Binary(const unsigned char *data_, std::size_t size_)
: m_unownedData(data_), m_unownedSize(size_) {}
bool owned() const { return !m_unownedData; }
std::size_t size() const { return owned() ? m_data.size() : m_unownedSize; }
const unsigned char *data() const {
return owned() ? &m_data[0] : m_unownedData;
}
void swap(std::vector<unsigned char> &rhs) {
if (m_unownedData) {
m_data.swap(rhs);
rhs.clear();
rhs.resize(m_unownedSize);
std::copy(m_unownedData, m_unownedData + m_unownedSize, rhs.begin());
m_unownedData = 0;
m_unownedSize = 0;
} else {
m_data.swap(rhs);
}
}
bool operator==(const Binary &rhs) const {
const std::size_t s = size();
if (s != rhs.size())
return false;
const unsigned char *d1 = data();
const unsigned char *d2 = rhs.data();
for (std::size_t i = 0; i < s; i++) {
if (*d1++ != *d2++)
return false;
}
return true;
}
bool operator!=(const Binary &rhs) const { return !(*this == rhs); }
private:
std::vector<unsigned char> m_data;
const unsigned char *m_unownedData;
std::size_t m_unownedSize;
};
}
#endif // BASE64_H_62B23520_7C8E_11DE_8A39_0800200C9A66
@@ -1,39 +0,0 @@
#ifndef ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if defined(_MSC_VER) || \
(defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
(__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
#include <vector>
#include "../anchor.h"
namespace YAML {
/**
* An object that stores and retrieves values correlating to {@link anchor_t}
* values.
*
* <p>Efficient implementation that can make assumptions about how
* {@code anchor_t} values are assigned by the {@link Parser} class.
*/
template <class T>
class AnchorDict {
public:
void Register(anchor_t anchor, T value) {
if (anchor > m_data.size()) {
m_data.resize(anchor);
}
m_data[anchor - 1] = value;
}
T Get(anchor_t anchor) const { return m_data[anchor - 1]; }
private:
std::vector<T> m_data;
};
}
#endif // ANCHORDICT_H_62B23520_7C8E_11DE_8A39_0800200C9A66
@@ -1,147 +0,0 @@
#ifndef GRAPHBUILDER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define GRAPHBUILDER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if defined(_MSC_VER) || \
(defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
(__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
#include "yaml-cpp/mark.h"
#include <string>
namespace YAML {
class Parser;
// GraphBuilderInterface
// . Abstraction of node creation
// . pParentNode is always NULL or the return value of one of the NewXXX()
// functions.
class GraphBuilderInterface {
public:
// Create and return a new node with a null value.
virtual void *NewNull(const Mark &mark, void *pParentNode) = 0;
// Create and return a new node with the given tag and value.
virtual void *NewScalar(const Mark &mark, const std::string &tag,
void *pParentNode, const std::string &value) = 0;
// Create and return a new sequence node
virtual void *NewSequence(const Mark &mark, const std::string &tag,
void *pParentNode) = 0;
// Add pNode to pSequence. pNode was created with one of the NewXxx()
// functions and pSequence with NewSequence().
virtual void AppendToSequence(void *pSequence, void *pNode) = 0;
// Note that no moew entries will be added to pSequence
virtual void SequenceComplete(void *pSequence) { (void)pSequence; }
// Create and return a new map node
virtual void *NewMap(const Mark &mark, const std::string &tag,
void *pParentNode) = 0;
// Add the pKeyNode => pValueNode mapping to pMap. pKeyNode and pValueNode
// were created with one of the NewXxx() methods and pMap with NewMap().
virtual void AssignInMap(void *pMap, void *pKeyNode, void *pValueNode) = 0;
// Note that no more assignments will be made in pMap
virtual void MapComplete(void *pMap) { (void)pMap; }
// Return the node that should be used in place of an alias referencing
// pNode (pNode by default)
virtual void *AnchorReference(const Mark &mark, void *pNode) {
(void)mark;
return pNode;
}
};
// Typesafe wrapper for GraphBuilderInterface. Assumes that Impl defines
// Node, Sequence, and Map types. Sequence and Map must derive from Node
// (unless Node is defined as void). Impl must also implement function with
// all of the same names as the virtual functions in GraphBuilderInterface
// -- including the ones with default implementations -- but with the
// prototypes changed to accept an explicit Node*, Sequence*, or Map* where
// appropriate.
template <class Impl>
class GraphBuilder : public GraphBuilderInterface {
public:
typedef typename Impl::Node Node;
typedef typename Impl::Sequence Sequence;
typedef typename Impl::Map Map;
GraphBuilder(Impl &impl) : m_impl(impl) {
Map *pMap = NULL;
Sequence *pSeq = NULL;
Node *pNode = NULL;
// Type consistency checks
pNode = pMap;
pNode = pSeq;
}
GraphBuilderInterface &AsBuilderInterface() { return *this; }
virtual void *NewNull(const Mark &mark, void *pParentNode) {
return CheckType<Node>(m_impl.NewNull(mark, AsNode(pParentNode)));
}
virtual void *NewScalar(const Mark &mark, const std::string &tag,
void *pParentNode, const std::string &value) {
return CheckType<Node>(
m_impl.NewScalar(mark, tag, AsNode(pParentNode), value));
}
virtual void *NewSequence(const Mark &mark, const std::string &tag,
void *pParentNode) {
return CheckType<Sequence>(
m_impl.NewSequence(mark, tag, AsNode(pParentNode)));
}
virtual void AppendToSequence(void *pSequence, void *pNode) {
m_impl.AppendToSequence(AsSequence(pSequence), AsNode(pNode));
}
virtual void SequenceComplete(void *pSequence) {
m_impl.SequenceComplete(AsSequence(pSequence));
}
virtual void *NewMap(const Mark &mark, const std::string &tag,
void *pParentNode) {
return CheckType<Map>(m_impl.NewMap(mark, tag, AsNode(pParentNode)));
}
virtual void AssignInMap(void *pMap, void *pKeyNode, void *pValueNode) {
m_impl.AssignInMap(AsMap(pMap), AsNode(pKeyNode), AsNode(pValueNode));
}
virtual void MapComplete(void *pMap) { m_impl.MapComplete(AsMap(pMap)); }
virtual void *AnchorReference(const Mark &mark, void *pNode) {
return CheckType<Node>(m_impl.AnchorReference(mark, AsNode(pNode)));
}
private:
Impl &m_impl;
// Static check for pointer to T
template <class T, class U>
static T *CheckType(U *p) {
return p;
}
static Node *AsNode(void *pNode) { return static_cast<Node *>(pNode); }
static Sequence *AsSequence(void *pSeq) {
return static_cast<Sequence *>(pSeq);
}
static Map *AsMap(void *pMap) { return static_cast<Map *>(pMap); }
};
void *BuildGraphOfNextDocument(Parser &parser,
GraphBuilderInterface &graphBuilder);
template <class Impl>
typename Impl::Node *BuildGraphOfNextDocument(Parser &parser, Impl &impl) {
GraphBuilder<Impl> graphBuilder(impl);
return static_cast<typename Impl::Node *>(
BuildGraphOfNextDocument(parser, graphBuilder));
}
}
#endif // GRAPHBUILDER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
-33
View File
@@ -1,33 +0,0 @@
#ifndef DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if defined(_MSC_VER) || \
(defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
(__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
// The following ifdef block is the standard way of creating macros which make
// exporting from a DLL simpler. All files within this DLL are compiled with the
// yaml_cpp_EXPORTS symbol defined on the command line. This symbol should not
// be defined on any project that uses this DLL. This way any other project
// whose source files include this file see YAML_CPP_API functions as being
// imported from a DLL, whereas this DLL sees symbols defined with this macro as
// being exported.
#undef YAML_CPP_API
#ifdef YAML_CPP_DLL // Using or Building YAML-CPP DLL (definition defined
// manually)
#ifdef yaml_cpp_EXPORTS // Building YAML-CPP DLL (definition created by CMake
// or defined manually)
// #pragma message( "Defining YAML_CPP_API for DLL export" )
#define YAML_CPP_API __declspec(dllexport)
#else // yaml_cpp_EXPORTS
// #pragma message( "Defining YAML_CPP_API for DLL import" )
#define YAML_CPP_API __declspec(dllimport)
#endif // yaml_cpp_EXPORTS
#else // YAML_CPP_DLL
#define YAML_CPP_API
#endif // YAML_CPP_DLL
#endif // DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
@@ -1,57 +0,0 @@
#ifndef EMITFROMEVENTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define EMITFROMEVENTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if defined(_MSC_VER) || \
(defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
(__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
#include <stack>
#include "yaml-cpp/anchor.h"
#include "yaml-cpp/emitterstyle.h"
#include "yaml-cpp/eventhandler.h"
namespace YAML {
struct Mark;
} // namespace YAML
namespace YAML {
class Emitter;
class EmitFromEvents : public EventHandler {
public:
EmitFromEvents(Emitter& emitter);
virtual void OnDocumentStart(const Mark& mark);
virtual void OnDocumentEnd();
virtual void OnNull(const Mark& mark, anchor_t anchor);
virtual void OnAlias(const Mark& mark, anchor_t anchor);
virtual void OnScalar(const Mark& mark, const std::string& tag,
anchor_t anchor, const std::string& value);
virtual void OnSequenceStart(const Mark& mark, const std::string& tag,
anchor_t anchor, EmitterStyle::value style);
virtual void OnSequenceEnd();
virtual void OnMapStart(const Mark& mark, const std::string& tag,
anchor_t anchor, EmitterStyle::value style);
virtual void OnMapEnd();
private:
void BeginNode();
void EmitProps(const std::string& tag, anchor_t anchor);
private:
Emitter& m_emitter;
struct State {
enum value { WaitingForSequenceEntry, WaitingForKey, WaitingForValue };
};
std::stack<State::value> m_stateStack;
};
}
#endif // EMITFROMEVENTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
@@ -1,254 +0,0 @@
#ifndef EMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define EMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if defined(_MSC_VER) || \
(defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \
(__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
#include <cstddef>
#include <memory>
#include <sstream>
#include <string>
#include "yaml-cpp/binary.h"
#include "yaml-cpp/dll.h"
#include "yaml-cpp/emitterdef.h"
#include "yaml-cpp/emittermanip.h"
#include "yaml-cpp/noncopyable.h"
#include "yaml-cpp/null.h"
#include "yaml-cpp/ostream_wrapper.h"
namespace YAML {
class Binary;
struct _Null;
} // namespace YAML
namespace YAML {
class EmitterState;
class YAML_CPP_API Emitter : private noncopyable {
public:
Emitter();
explicit Emitter(std::ostream& stream);
~Emitter();
// output
const char* c_str() const;
std::size_t size() const;
// state checking
bool good() const;
const std::string GetLastError() const;
// global setters
bool SetOutputCharset(EMITTER_MANIP value);
bool SetStringFormat(EMITTER_MANIP value);
bool SetBoolFormat(EMITTER_MANIP value);
bool SetIntBase(EMITTER_MANIP value);
bool SetSeqFormat(EMITTER_MANIP value);
bool SetMapFormat(EMITTER_MANIP value);
bool SetIndent(std::size_t n);
bool SetPreCommentIndent(std::size_t n);
bool SetPostCommentIndent(std::size_t n);
bool SetFloatPrecision(std::size_t n);
bool SetDoublePrecision(std::size_t n);
// local setters
Emitter& SetLocalValue(EMITTER_MANIP value);
Emitter& SetLocalIndent(const _Indent& indent);
Emitter& SetLocalPrecision(const _Precision& precision);
// overloads of write
Emitter& Write(const std::string& str);
Emitter& Write(bool b);
Emitter& Write(char ch);
Emitter& Write(const _Alias& alias);
Emitter& Write(const _Anchor& anchor);
Emitter& Write(const _Tag& tag);
Emitter& Write(const _Comment& comment);
Emitter& Write(const _Null& n);
Emitter& Write(const Binary& binary);
template <typename T>
Emitter& WriteIntegralType(T value);
template <typename T>
Emitter& WriteStreamable(T value);
private:
template <typename T>
void SetStreamablePrecision(std::stringstream&) {}
std::size_t GetFloatPrecision() const;
std::size_t GetDoublePrecision() const;
void PrepareIntegralStream(std::stringstream& stream) const;
void StartedScalar();
private:
void EmitBeginDoc();
void EmitEndDoc();
void EmitBeginSeq();
void EmitEndSeq();
void EmitBeginMap();
void EmitEndMap();
void EmitNewline();
void EmitKindTag();
void EmitTag(bool verbatim, const _Tag& tag);
void PrepareNode(EmitterNodeType::value child);
void PrepareTopNode(EmitterNodeType::value child);
void FlowSeqPrepareNode(EmitterNodeType::value child);
void BlockSeqPrepareNode(EmitterNodeType::value child);
void FlowMapPrepareNode(EmitterNodeType::value child);
void FlowMapPrepareLongKey(EmitterNodeType::value child);
void FlowMapPrepareLongKeyValue(EmitterNodeType::value child);
void FlowMapPrepareSimpleKey(EmitterNodeType::value child);
void FlowMapPrepareSimpleKeyValue(EmitterNodeType::value child);
void BlockMapPrepareNode(EmitterNodeType::value child);
void BlockMapPrepareLongKey(EmitterNodeType::value child);
void BlockMapPrepareLongKeyValue(EmitterNodeType::value child);
void BlockMapPrepareSimpleKey(EmitterNodeType::value child);
void BlockMapPrepareSimpleKeyValue(EmitterNodeType::value child);
void SpaceOrIndentTo(bool requireSpace, std::size_t indent);
const char* ComputeFullBoolName(bool b) const;
bool CanEmitNewline() const;
private:
std::unique_ptr<EmitterState> m_pState;
ostream_wrapper m_stream;
};
template <typename T>
inline Emitter& Emitter::WriteIntegralType(T value) {
if (!good())
return *this;
PrepareNode(EmitterNodeType::Scalar);
std::stringstream stream;
PrepareIntegralStream(stream);
stream << value;
m_stream << stream.str();
StartedScalar();
return *this;
}
template <typename T>
inline Emitter& Emitter::WriteStreamable(T value) {
if (!good())
return *this;
PrepareNode(EmitterNodeType::Scalar);
std::stringstream stream;
SetStreamablePrecision<T>(stream);
stream << value;
m_stream << stream.str();
StartedScalar();
return *this;
}
template <>
inline void Emitter::SetStreamablePrecision<float>(std::stringstream& stream) {
stream.precision(static_cast<std::streamsize>(GetFloatPrecision()));
}
template <>
inline void Emitter::SetStreamablePrecision<double>(std::stringstream& stream) {
stream.precision(static_cast<std::streamsize>(GetDoublePrecision()));
}
// overloads of insertion
inline Emitter& operator<<(Emitter& emitter, const std::string& v) {
return emitter.Write(v);
}
inline Emitter& operator<<(Emitter& emitter, bool v) {
return emitter.Write(v);
}
inline Emitter& operator<<(Emitter& emitter, char v) {
return emitter.Write(v);
}
inline Emitter& operator<<(Emitter& emitter, unsigned char v) {
return emitter.Write(static_cast<char>(v));
}
inline Emitter& operator<<(Emitter& emitter, const _Alias& v) {
return emitter.Write(v);
}
inline Emitter& operator<<(Emitter& emitter, const _Anchor& v) {
return emitter.Write(v);
}
inline Emitter& operator<<(Emitter& emitter, const _Tag& v) {
return emitter.Write(v);
}
inline Emitter& operator<<(Emitter& emitter, const _Comment& v) {
return emitter.Write(v);
}
inline Emitter& operator<<(Emitter& emitter, const _Null& v) {
return emitter.Write(v);
}
inline Emitter& operator<<(Emitter& emitter, const Binary& b) {
return emitter.Write(b);
}
inline Emitter& operator<<(Emitter& emitter, const char* v) {
return emitter.Write(std::string(v));
}
inline Emitter& operator<<(Emitter& emitter, int v) {
return emitter.WriteIntegralType(v);
}
inline Emitter& operator<<(Emitter& emitter, unsigned int v) {
return emitter.WriteIntegralType(v);
}
inline Emitter& operator<<(Emitter& emitter, short v) {
return emitter.WriteIntegralType(v);
}
inline Emitter& operator<<(Emitter& emitter, unsigned short v) {
return emitter.WriteIntegralType(v);
}
inline Emitter& operator<<(Emitter& emitter, long v) {
return emitter.WriteIntegralType(v);
}
inline Emitter& operator<<(Emitter& emitter, unsigned long v) {
return emitter.WriteIntegralType(v);
}
inline Emitter& operator<<(Emitter& emitter, long long v) {
return emitter.WriteIntegralType(v);
}
inline Emitter& operator<<(Emitter& emitter, unsigned long long v) {
return emitter.WriteIntegralType(v);
}
inline Emitter& operator<<(Emitter& emitter, float v) {
return emitter.WriteStreamable(v);
}
inline Emitter& operator<<(Emitter& emitter, double v) {
return emitter.WriteStreamable(v);
}
inline Emitter& operator<<(Emitter& emitter, EMITTER_MANIP value) {
return emitter.SetLocalValue(value);
}
inline Emitter& operator<<(Emitter& emitter, _Indent indent) {
return emitter.SetLocalIndent(indent);
}
inline Emitter& operator<<(Emitter& emitter, _Precision precision) {
return emitter.SetLocalPrecision(precision);
}
}
#endif // EMITTER_H_62B23520_7C8E_11DE_8A39_0800200C9A66

Some files were not shown because too many files have changed in this diff Show More