Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/issue 624,751,809,803 -Remote Control Modules (LIGHT, AUDIO, HMI_SETTINGS) and parameters (SIS Data) #712

Merged
merged 12 commits into from
Aug 30, 2018

Conversation

mrapitis
Copy link
Contributor

@mrapitis mrapitis commented Mar 15, 2018

Fixes #624, #751, #809, #803

This PR is ready for review.

Risk

This PR makes minor API changes.

Testing Plan

Added new unit tests and expanded existing ones

Summary

Added RPC's, structs, enums as defined in the RC Modules (LIGHT, AUDIO, HMI_SETTINGS) and parameters (SIS Data), RC Lights – More Names and Status Values, Audio Source AM/FM/XM/DAB, Updating DOP value range for GPS notification proposals

CLA

  • I have signed the CLA

@codecov-io
Copy link

codecov-io commented Mar 15, 2018

Codecov Report

Merging #712 into develop will increase coverage by 0.84%.
The diff coverage is 91.22%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #712      +/-   ##
=============================================
+ Coverage      43.41%   44.25%   +0.84%     
- Complexity      3029     3165     +136     
=============================================
  Files            382      397      +15     
  Lines          17461    17776     +315     
  Branches        1736     1736              
=============================================
+ Hits            7580     7867     +287     
- Misses          9563     9591      +28     
  Partials         318      318
Impacted Files Coverage Δ Complexity Δ
...in/java/com/smartdevicelink/proxy/rpc/GPSData.java 95.5% <0%> (-4.5%) 39 <0> (ø)
...devicelink/proxy/rpc/RadioControlCapabilities.java 100% <100%> (ø) 25 <2> (+2) ⬆️
...com/smartdevicelink/proxy/rpc/enums/LightName.java 100% <100%> (ø) 2 <2> (?)
...com/smartdevicelink/proxy/rpc/StationIDNumber.java 100% <100%> (ø) 6 <6> (?)
...java/com/smartdevicelink/proxy/rpc/ModuleData.java 100% <100%> (ø) 17 <6> (+6) ⬆️
.../smartdevicelink/proxy/rpc/enums/DistanceUnit.java 100% <100%> (ø) 2 <2> (?)
...devicelink/proxy/rpc/enums/PrimaryAudioSource.java 100% <100%> (ø) 2 <1> (ø) ⬇️
...in/java/com/smartdevicelink/proxy/rpc/SisData.java 100% <100%> (ø) 12 <12> (?)
...rtdevicelink/proxy/rpc/HMISettingsControlData.java 100% <100%> (ø) 8 <8> (?)
...m/smartdevicelink/proxy/rpc/enums/DisplayMode.java 100% <100%> (ø) 2 <2> (?)
... and 29 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 89bcf24...9031e80. Read the comment docs.

@mrapitis mrapitis force-pushed the feature/issue_624 branch 2 times, most recently from 8044831 to 10386b1 Compare July 19, 2018 20:18
@mrapitis
Copy link
Contributor Author

mrapitis commented Aug 1, 2018

@joeygrover we have updated this PR to include the latest develop, please let us know if anything else is required for review. If desired, we can combine PR's #712, #821, #822 into a single PR to simplify the review process (as the proposals depend on each other).

* {@link com.smartdevicelink.rpc.ClimateControlCapabilities}
*/
public class ClimateControlCapabilitiesTests extends TestCase{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this class is diffing existing code to 2 tabs in instead of 1?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am actually seeing that on a lot of the tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can update to a single tab. The existing tabbing in many of the test files has been a bit off.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, Just trying to keep things as consistent as possible. Thanks

String example = "mILES";
try {
DistanceUnit temp = DistanceUnit.valueForString(example);
assertNull("Result of valueForString should be null.", temp);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spacing fixes, please. There are a few in this class.

String example = "fRONT_LEFT_HIGH_BEAM";
try {
LightName temp = LightName.valueForString(example);
assertNull("Result of valueForString should be null.", temp);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing in this and the next method are off

String example = "oN";
try {
LightStatus temp = LightStatus.valueForString(example);
assertNull("Result of valueForString should be null.", temp);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing in this and next method

import java.util.Hashtable;
import java.util.List;

/**
* Contains information about a climate control module's capabilities.
*/

public class ClimateControlCapabilities extends RPCStruct{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For history purposes, can this entire class not be changed?

import java.util.Hashtable;

public class ClimateControlData extends RPCStruct{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For history, is it possible to only change the additions and not the whole class? It also makes it easier to review.

@@ -19,6 +19,7 @@
public static final String KEY_STATE_AVAILABLE= "stateAvailable";
public static final String KEY_SIGNAL_STRENGTH_AVAILABLE= "signalStrengthAvailable";
public static final String KEY_SIGNAL_CHANGE_THRESHOLD_AVAILABLE= "signalChangeThresholdAvailable";
public static final String KEY_SIS_DATA_AVAILABLE= "sisDataAvailable";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing

* True: Available, False: Not Available, Not present: Not Available.
*/
public Boolean getSisDataAvailable() {
return getBoolean(KEY_SIS_DATA_AVAILABLE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing

@@ -20,6 +21,7 @@
public static final String KEY_SIGNAL_CHANGE_THRESHOLD= "signalChangeThreshold";
public static final String KEY_RADIO_ENABLE= "radioEnable";
public static final String KEY_STATE= "state";
public static final String KEY_SIS_DATA= "sisData";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing

public StationIDNumber() {}

public StationIDNumber(Hashtable<String, Object> hash) {
super(hash);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are a few areas in this class where spacing is off

@mrapitis
Copy link
Contributor Author

@therealbrett PR has been updated, please re-review when time permits. Thanks!

@mrapitis mrapitis changed the title Feature/issue 624 -Remote Control Modules (LIGHT, AUDIO, HMI_SETTINGS) and parameters (SIS Data) Feature/issue 624,751,809,803 -Remote Control Modules (LIGHT, AUDIO, HMI_SETTINGS) and parameters (SIS Data) Aug 13, 2018
@@ -181,30 +181,10 @@ public GPSData(Hashtable<String, Object> hash) {
/**
* Constructs a newly allocated GPSData object
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this old constructor is a major change. Please keep it and deprecate it.

@@ -1688,55 +1688,55 @@
</param>
<param name="latitudeDegrees" type="Float" minvalue="-90" maxvalue="90" mandatory="true">
</param>
<param name="utcYear" type="Integer" minvalue="2010" maxvalue="2100" mandatory="true">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not have any changes to it, as this is not part of the 4.5 spec

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be preferred for us to create a MOBILE_API_4.7.0.xml file with the API changes, add it to the project and reference it from: https://github.com/smartdevicelink/sdl_android/blob/develop/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCConstructorsTests.java#L28
(leaving MOBILE_API_4.5.0.xml unchanged)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to look into this and will get back to you soon

LightName enumRearLeftTailLight = LightName.valueForString(example);
example = "REAR_RIGHT_TAIL_LIGHT";
LightName enumRearRightTailLight = LightName.valueForString(example);
example = "REAR_LEFT_BREAK_LIGHT";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These now need to be updated per a proposal update to REAR_LEFT_BRAKE_LIGHT and REAR_RIGHT_BRAKE_LIGHT

REAR_RIGHT_FOG_LIGHT,
REAR_LEFT_TAIL_LIGHT,
REAR_RIGHT_TAIL_LIGHT,
REAR_LEFT_BREAK_LIGHT,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These now need to be updated per a proposal update to REAR_LEFT_BRAKE_LIGHT and REAR_RIGHT_BRAKE_LIGHT

@mrapitis
Copy link
Contributor Author

@therealbrett enums have been updated to reflect the updated proposal. Please re-review when time permits. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants