SzFMV2020-Tavasz / AutomatedCar-A

Working repository for the subject "Szoftverfejlesztés multinacionális vállalatoknál" @OE-NIK 2020 Spring Group A
2 stars 1 forks source link

master <---- Tempomat (Simple) #225

Closed aether-fox closed 4 years ago

aether-fox commented 4 years ago

Tempomat Functionality

AutomatedCar must be in D transmission mode to use the cruise control aka. tempomat. While the cruise control is active, the car keeps the speed on 10. The implementation is quite simple (if slower than required, press gas, if faster, then gas pedal is not pressed). The main purpose of this merge is to slowly integrate the abstractions applied to existing codebase in order to fit the tempomat mechanics in. So, users can test a very basic tempomat functionality, while developers can adapt to the changes quickly (integrating the developments of the teams together more regularly).

Changes to Existing Codebase

Yes, there are. I tried to kinda minimalize the changes and maintain as much backwards compatibility as possible. Meanwhile many code parts became deprecated. In such case you find, that you call a deprecated method or use a deprecated field, look around, usually there is a new, similar and more straightforward implementation for it. At some places I even added comment above the given element describing what to use instead. Deprecated methods and fields are maintained and do function until all uses are eliminated by time.

codecov[bot] commented 4 years ago

Codecov Report

Merging #225 into master will decrease coverage by 0.41%. The diff coverage is 9.56%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #225      +/-   ##
============================================
- Coverage     46.73%   46.32%   -0.42%     
- Complexity      444      445       +1     
============================================
  Files            78       78              
  Lines          2929     2977      +48     
  Branches        277      288      +11     
============================================
+ Hits           1369     1379      +10     
- Misses         1461     1499      +38     
  Partials         99       99              
Flag Coverage Δ Complexity Δ
#unittests 46.32% <9.56%> (-0.42%) 445.00 <3.00> (+1.00) :arrow_down:
Impacted Files Coverage Δ Complexity Δ
...utomatedcar/cruisecontrol/CruiseControlPacket.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...nik/szfmv/automatedcar/systemcomponents/Index.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../virtualfunctionbus/packets/ICarControlPacket.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...nbus/packets/hmioutputpackets/BaseInputPacket.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...zfmv/automatedcar/cruisecontrol/CruiseControl.java 11.62% <7.31%> (-55.04%) 1.00 <1.00> (ø)
...s/packets/hmioutputpackets/ToPowerTrainPacket.java 6.25% <16.66%> (+2.25%) 1.00 <1.00> (ø)
.../nik/szfmv/automatedcar/powertrain/PowerTrain.java 29.23% <19.04%> (+1.45%) 6.00 <1.00> (+1.00)
...atedcar/virtualfunctionbus/VirtualFunctionBus.java 60.00% <100.00%> (+6.15%) 2.00 <0.00> (ø)
... and 1 more
aether-fox commented 4 years ago

@pintergreg I am ready to merge a basic tempomat implementation, mainly for the purpose of integrating the new classes and providing simple, slow movement for testing.

aether-fox commented 4 years ago

@pintergreg Köszönöm a review-t!

ha felengedem a féket akkor visszagyorsít a target speedre

Igen, mert az ACC ki/be kapcsolása per pillanat az input csapatnál van eltárolva egy boolean értékként és a GUI is azt jeleníti meg. Ez eddig érthető volt, mert nem volt híre/hanva sem az ACC-nek, csak most került be. Messenger csoportban már felvetettem, hogy adaptálódjanak a bekerült kódhoz (erre készült ez a PR). Így csak úgy tudtam megvalósítani egyelőre emberi intuíciót meg nem törő módon, hogy amíg a vék pedál nyomva van, csak addig kapcsol ki a tempomat (a log-ban látszik mikor kapcsol ki/be). Hogy legyen nyoma beleírom a fórumjuk-ba is ezt így, hogy bekerült ez a merge.

a DoD elég egyértelműen 30km/h-át ír

Most egy ideális lassú sebességet írtam be "szemre", hogy valamire használható is legyen. A sebesség mértéke per pillanat nem is tudom miben van meghatározva, gondolom az FPS-től függ egyébként. Az 50 pixel = 1 méter átváltást lehet esetleg használni, ha van igény ilyen jellegű sebesség mérésre (úgy látom van) akkor gondolkozom ezen és pofozgatom ezt a részét is a rendszernek.

pintergreg commented 4 years ago

Igazából ez 10(km/h) tök jó, szóval maradhat. Ezért mondtam, hogy lehet ez így, maradhat ez ennyi.