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

At handler improvements #11306

Merged
merged 2 commits into from
Sep 2, 2019
Merged

Conversation

AnttiKauppila
Copy link

@AnttiKauppila AnttiKauppila commented Aug 23, 2019

Description

New ATHandler functions taken into use for rest of the targets (BG96 was updated initially) to reduce code size. This means basically that new functions using variadic list approach are taken into use and with those one can usually write AT commands in single line instead of multiple lines.
Only internal changes and API's are not modified.

Pull request type

[ ] Fix
[X] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@ARMmbed/mbed-os-wan

Release Notes

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 23, 2019

How do these 2 commits differ if both have the same commit msg ? Shouldn't it then be one or commit messages changed?

@AnttiKauppila
Copy link
Author

Some git magic :)

@ciarmcom
Copy link
Member

@AnttiKauppila, thank you for your changes.
@ARMmbed/mbed-os-wan @ARMmbed/mbed-os-maintainers please review.

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

Can we at least expand the commit message?
26 files changed and do not find there what improvements - I've noticed we use new commands like cmd_start_stop instead of previously start/write/stop. Brief description would be nice to have.

Copy link
Contributor

@mirelachirica mirelachirica left a comment

Choose a reason for hiding this comment

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

Couldnt spot any issue. Checked WISE_1570 TCP socket tests - passing.

_at.write_int(read_len);
_at.cmd_stop();

_at.cmd_start_stop("+QIRD", "=", "%d%d%d%d", 0, 1, socket->id, read_len);
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be good to maintain the explanatory comments for 0 and 1 usage?

Copy link
Author

Choose a reason for hiding this comment

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

Better would be to use defines instead of magical numbers

@AnttiKauppila
Copy link
Author

Can we at least expand the commit message?
26 files changed and do not find there what improvements - I've noticed we use new commands like cmd_start_stop instead of previously start/write/stop. Brief description would be nice to have.

Updated, is it better now?

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 26, 2019

Also commit message (I dont see the update here) ?

@AnttiKauppila
Copy link
Author

Propose a better one. What do you want to see in it?

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 26, 2019

New ATHandler functions taken into use for rest of the targets (BG96 was updated initially) to reduce code size. This means basically that new functions using variadic list approach are taken into use and with those one can usually write AT commands in single line instead of multiple lines.
Only internal changes and API's are not modified.

This should be sufficient in the commit msg (explains what is being improved and why).

New ATHandler functions taken into use for rest of the targets (BG96 was updated initially) to reduce code size. This means basically that new functions using variadic list approach are taken into use and with those one can usually write AT commands in single line instead of multiple lines.
Only internal changes and API's are not modified.
_at->cmd_start("AT+CFUN=0");
_at->cmd_stop_read_resp();
_at->at_cmd_discard("+CFUN", "=0");

if (_at->get_last_error() == NSAPI_ERROR_OK) {
Copy link
Contributor

Choose a reason for hiding this comment

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

"_at->get_last_error()" looks outside lock/unlock as "_at->at_cmd_discard" is unlocking inside it.

Timer t1;
t1.start();
while (!(t1.read() >= 180)) {
_at.cmd_start("AT+UPSND=" PROFILE ",8");
_at.cmd_stop();
_at.cmd_start_stop("+UPSND", "=", "%d%d", PROFILE, 8);
Copy link
Contributor

Choose a reason for hiding this comment

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

Calling without at lock().

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 29, 2019

One small styling change needed (see astyle job failure).

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 29, 2019

@AnttiKauppila Is this targeting 5.14? Not yet labeled !

@mbed-ci
Copy link

mbed-ci commented Sep 2, 2019

Test run: FAILED

Summary: 1 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 2, 2019

Known issue with CI, restarting the build

@mbed-ci
Copy link

mbed-ci commented Sep 2, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 2
Build artifacts

@AnttiKauppila
Copy link
Author

@0xc0170 Is this now ready to go in.

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

Successfully merging this pull request may close these issues.

6 participants