-
-
Notifications
You must be signed in to change notification settings - Fork 283
Improvements for CurieBLE library #298
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
Conversation
Improve documentation and code formatting of BLEAttribute, BLECharacteristic and BLEProfile classes Signed-off-by: Biagio Montaruli <[email protected]>
Add CurieBLE and new names of methods defined in some classes of CurieBLE library Signed-off-by: Biagio Montaruli <[email protected]>
Can you please isolate the auto-formatting to an individual commit? That way we can tell the actual changes apart. |
bbd7bdb
to
b10db51
Compare
Hi @calvinatintel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I won't comment on every instance of style changes, but please find them and isolate them into a single commit.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
/* Please see code copyright at the bottom of this example code */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea why this file shows as the whole thing is changed, rather than line changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @calvinatintel,
I notice that the BatteryAdvChange.ino sketch has a strange formatting type.
Even if you change only a single line this file shows as the whole thing is changed.
@@ -71,14 +76,14 @@ void loop() { | |||
static unsigned short count = 0; | |||
count++; | |||
// update the connection interval | |||
if(count%5 == 0){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please isolate indentation and style changes into a single commit
@@ -87,7 +92,7 @@ void loop() { | |||
void updateBatteryLevel() { | |||
/* Read the current voltage level on the A0 analog input pin. | |||
This is used here to simulate the charge level of a battery. | |||
*/ | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please isolate indentation and style changes into a single commit
Serial.println(m_conn_param.latency ); | ||
Serial.print("timeout = " ); | ||
Serial.println(m_conn_param.timeout ); | ||
Serial.print("min interval = "); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please isolate indentation and style changes into a single commit
//Update connection interval | ||
Serial.println("set Connection Interval"); | ||
central.setConnectionInterval(interval,interval); | ||
// Update connection interval |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please isolate indentation and style changes into a single commit
|
||
interval++; | ||
if(interval<0x06) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please isolate indentation and style changes into a single commit
const int buttonPin = 4; // set buttonPin to digital pin 4 | ||
|
||
BLEPeripheral blePeripheral; // create peripheral instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please isolate indentation and style changes into a single commit
- Improve documentation and code for sketches of CurieBLE library - Add support for USB virtual serial port : Arduino/Genuino 101 uses USB native port as Serial port, moreover the sketches of CurieBLE library use Serial communication and they send data to the Serial Monitor in the 'void setup()' function, so adding 'while(!Serial)' waits for the Serial port to connect in order to not loose data already sent to the Serial Monitor. Added also documentation to inform the user to open the Serial Monitor to continue executing the sketch because 'while(!Serial)' also waits for the user to open the Serial Monitor Signed-off-by: Biagio Montaruli <[email protected]>
Update code formatting for sketches of CurieBLE library with the Auto Format tool of Arduino IDE Signed-off-by: Biagio Montaruli <[email protected]>
75b4f7d
to
2e6a327
Compare
Hi @calvinatintel, |
How about something like this?
I really appreciate all the work you've put into improving the comments. I just wish to highlight them properly by isolating the indentation changes into a single commit. |
Hi @calvinatintel,
Best regards. |
Hey @biagiom , I see. I understand it better now. I think e044d9b needs a little work, as it changes both styles and functions. For instance, Since this PR changes so many lines at once, I plan to validate the stylistic changes by compiling both before and after, then look for a binary match. This will significantly reduce the number of lines that we will have to review. Would that work for you? I'm open to suggestions of course, if there's a better workflow. Thanks, |
Hi @calvinatintel,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eriknyquist @bigdinotech @SidLeung Can you please review?
Hi @biagiom Instead of splitting into code vs docs, how about splitting it into stylistic vs functional changes? |
Please reopen when you have a new version of the commits |
Changes for CurieBLE library based on the current master branch to resolve conflicts of #295 pull request