[SDL-0262] New vehicle data SeatOccupancy#351
Conversation
|
@santhanamk the PR is ready for Ford review. |
santhanamk
left a comment
There was a problem hiding this comment.
Hi @ymalovanyi I reviewed the PR. Code looks good.
I have a few comments. Please look through it, and see if any changes need to be made.
tests/Test.js
Outdated
| }; | ||
|
|
||
| const GENERAL_SEAT_OCCUPANCY = Test.GENERAL_SEAT_OCCUPANCY = new SeatOccupancy() | ||
| .setSeatsOccupied([Test.GENERAL_SEAT_STATUS]) |
There was a problem hiding this comment.
Given that seatsOccupied and seatsBelted are arrays in the 'SeatsOccupancy.js' struct, does the GENERAL_SEAT_STATUS on line 431 need to be instantiated differently?
For example on line 128 imageTypeSupported is an array and is set up with the GENERAL_FILETYPE_LIST using the line GENERAL_IMAGEFIELD.setImageTypeSupported(GENERAL_FILETYPE_LIST);.
There was a problem hiding this comment.
Hi @santhanamk
I've created GENERAL_SEAT_STATUS_LIST and JSON_SEATSTATUS_LIST arrays to make code look cleaner.
| Validator.assertEquals(Test.GENERAL_BOOLEAN, testHandsOffSteering); | ||
| Validator.assertEquals([Test.GENERAL_WINDOW_STATUS], testWindowStatus); | ||
| Validator.assertEquals(this.gearStatus, testGearStatus); | ||
| Validator.assertEquals(Test.GENERAL_SEAT_OCCUPANCY, testSeatOccupancy); |
There was a problem hiding this comment.
On line 80 are brackets ( [] ) needed around Test.GENERAL_SEAT_OCCUPANCY similar to line 76 for Test.GENERAL_WINDOW_STATUS?
There was a problem hiding this comment.
No, because seatOccupancy is not an array (SeatOccupancy), compared to windowStatus which is indeed an array (WindowStatus[])
| Validator.assertEquals(this.stabilityControlsStatus, testStabilityControlsStatus); | ||
| Validator.assertEquals([Test.GENERAL_WINDOW_STATUS], testWindowStatus); | ||
| Validator.assertEquals(this.gearStatus, testGearStatus); | ||
| Validator.assertEquals(Test.GENERAL_SEAT_OCCUPANCY, testSeatOccupancy); |
There was a problem hiding this comment.
On line 78 are brackets ( [] ) needed around Test.GENERAL_SEAT_OCCUPANCY similar to line 76 for Test.GENERAL_WINDOW_STATUS?
There was a problem hiding this comment.
Also not needed, same as in GetVehicleDataResponseTests.js
santhanamk
left a comment
There was a problem hiding this comment.
Hi @ymalovanyi . The changes you have made from the code review good. I will approve this PR. Thanks.
|
@santhanamk, thank you for the approval! @crokita, Ford approved this PR, please review. |
|
Hi @ymalovanyi and @santhanamk, since the core PR for this feature is not complete, it seems that this PR would have not been tested fully. To ensure the review process goes smoothly:
Once this PR is fully tested, tag me and Livio will review. Thank you! |
|
@jordynmackool @crokita the description was fixed to include all sections from the template and the code was tested against the Core and HMI (corresponded links also included in the description). Please review. |
renonick87
left a comment
There was a problem hiding this comment.
Successfully tested against core and sdl_hmi. Everything here looks good. Approved.
|
Hi @renonick87, after merging, we have some conflicted vehicle data PRs. Could you define which will be reviewed next, then we could prepare it and fix conflicts before your review? |
Fixes #336
Risk
This PR makes minor API changes.
Testing Plan
Unit Tests
Added unit tests cover [SDL 0262] New vehicle data SeatOccupancy changes
Core Tests
VehicleDataTypeenum contains additional value"VEHICLEDATA_SEATOCCUPANCY"SeatStatuscan be received from HMISeatOccupancycan be received from HMISubscribeVehicleData,UnsubscribeVehicleData,GetVehicleDatarequest messages can be sent withseatOccupancyparameter defined as boolean valueSubscribeVehicleData,UnsubscribeVehicleDataresponse messages containseatOccupancyparameter defined asVehicleDataResultstructGetVehicleData,OnVehicleDataresponse messages containseatOccupancyparameter defined asSeatOccupancystructCore version / branch / commit hash / module tested against: smartdevicelink/sdl_core#3585
HMI name / version / branch / commit hash / module tested against: smartdevicelink/sdl_hmi#467
Summary
Applied [SDL 0262] New vehicle data SeatOccupancy changes
Changelog
Breaking Changes
N/AEnhancements
SeatStatus,SeatOccupancyBug Fixes
N/ATasks Remaining:
N/ACLA