Skip to content
This repository was archived by the owner on Apr 24, 2019. It is now read-only.

IOTCLT-1737: use abstracted button names #290

Merged
merged 6 commits into from
Dec 2, 2017
Merged

Conversation

JuhaYlipekkala
Copy link
Contributor

Status

NOT READY

Migrations

NO

Description

Use abstracted button names and forget K64F-specific code. Refactored interaction functionality and ticker code to a separate class. Marked as not ready since this is just one possible approach to the issue and could be unnecessary.

Related PR

#289

@JanneKiiskila
Copy link
Contributor

Nucleo F429_ZI fails. You could do test runs by running ./build_all.sh.
Tricky compile against some BUTTON -thing, which might not exist in all boards.

main.cpp Outdated
#endif

// Use the counter button handler to send an update of endpoint resource values
// to connector every 15 seconds periodically.
timer.attach(this, &InteractionProvider::counter_button_handler, 15.0);
Copy link
Contributor

Choose a reason for hiding this comment

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

If we do it this way, with boards having button -> the counter will be updated WITH counter + timer.
I was thinking of a separate counter resource and separate timer resource (lwm2m resource).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I see. Should not be a big hurdle to add that separate resource after the main change is actually working.

@@ -0,0 +1,22 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think Odin needs a separate ethernet config, it can re-use the generic eth config?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the generic ethernet config has the button item enabled, and I tried to follow suit with the other board-specific deviations in the set of configurations.

@@ -0,0 +1,22 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, odin can re-use the generic eth v6 json.

@JanneKiiskila
Copy link
Contributor

There's one thing still; see -

#ifdef TARGET_K64F

It's still referrring to K64F, it should refer to MBED_APP_CONF_BUTTON1 for example on UBLOX_EVK_ODIN_W2.

@JanneKiiskila
Copy link
Contributor

ARMmbed/mbed-os#4951 on-going to get the BUTTON1 defined to Ublox Odin. However, on my 1st trials it looked like the buttons in UBLOX do not work.

@teetak01
Copy link
Contributor

What is status of this PR?

@JanneKiiskila
Copy link
Contributor

JanneKiiskila commented Dec 1, 2017

We really need to get this in. Hexiwear is now failing spectacularly, because it's actually looking like "TARGET_K64F". Which I really do not understand, as it's Hexiwear, NOT K64F.

https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json#L660

I think that is a bug, personally. Hexiwear is imposing to be a K64F, which it isn't. It shares the same MCU etc, but for example buttons are different.

@JuhaYlipekkala
Copy link
Contributor Author

I rebased the branch to latest from master, hopefully nothing major was broken in the process.

@JuhaYlipekkala JuhaYlipekkala merged commit 5e0b3e3 into master Dec 2, 2017
@JanneKiiskila JanneKiiskila deleted the button-abstraction branch December 3, 2017 12:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants