BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mangoh-drivers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
mangoh-drivers
Commits
e3a42fb9
Commit
e3a42fb9
authored
Mar 16, 2017
by
David Frey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update wakeupAndTweet to build with Legato 17.03.rc4
parent
fb35e221
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
18 deletions
+19
-18
wakeupAndTweet.adef
samples/tutorials/developerDay2016/apps/wakeupAndTweet.adef
+3
-1
Component.cdef
...developerDay2016/components/wakeupAndTweet/Component.cdef
+2
-1
main.cpp
...s/developerDay2016/components/wakeupAndTweet/src/main.cpp
+11
-14
developerDay2016.sdef
samples/tutorials/developerDay2016/developerDay2016.sdef
+3
-2
No files found.
samples/tutorials/developerDay2016/apps/wakeupAndTweet.adef
View file @
e3a42fb9
version: 1.
1
version: 1.
3
sandboxed: true
sandboxed: true
start: auto
start: auto
...
@@ -34,4 +34,5 @@ bindings:
...
@@ -34,4 +34,5 @@ bindings:
wakeupAndTweet.wakeupAndTweet.le_adc -> modemService.le_adc
wakeupAndTweet.wakeupAndTweet.le_adc -> modemService.le_adc
wakeupAndTweet.wakeupAndTweet.le_data -> dataConnectionService.le_data
wakeupAndTweet.wakeupAndTweet.le_data -> dataConnectionService.le_data
wakeupAndTweet.wakeupAndTweet.le_avdata -> avcService.le_avdata
wakeupAndTweet.wakeupAndTweet.le_avdata -> avcService.le_avdata
wakeupAndTweet.wakeupAndTweet.le_info -> modemService.le_info
}
}
\ No newline at end of file
samples/tutorials/developerDay2016/components/wakeupAndTweet/Component.cdef
View file @
e3a42fb9
...
@@ -7,7 +7,8 @@ requires:
...
@@ -7,7 +7,8 @@ requires:
le_bootReason.api
le_bootReason.api
le_adc.api
le_adc.api
le_data.api
le_data.api
airVantage/le_avdata.api
airVantage/legacy/le_avdata.api
modemServices/le_info.api
}
}
}
}
...
...
samples/tutorials/developerDay2016/components/wakeupAndTweet/src/main.cpp
View file @
e3a42fb9
...
@@ -98,10 +98,7 @@ static void LightSensorSampleTimerHandler
...
@@ -98,10 +98,7 @@ static void LightSensorSampleTimerHandler
LE_DEBUG
(
"Light sensor reports value %d"
,
lightSensorReading
);
LE_DEBUG
(
"Light sensor reports value %d"
,
lightSensorReading
);
}
}
if
(
le_avdata_SetInt
(
LightSensorAsset
,
"Reading"
,
lightSensorReading
)
!=
LE_OK
)
le_avdata_SetInt
(
LightSensorAsset
,
"Reading"
,
lightSensorReading
);
{
LE_WARN
(
"Couldn't publish light sensor reading"
);
}
if
(
lightSensorReading
<
ADC_LEVEL_SLEEP
)
if
(
lightSensorReading
<
ADC_LEVEL_SLEEP
)
{
{
...
@@ -109,23 +106,17 @@ static void LightSensorSampleTimerHandler
...
@@ -109,23 +106,17 @@ static void LightSensorSampleTimerHandler
"Initiating shutdown due to light sensor value %d which is below the minimum %d"
,
"Initiating shutdown due to light sensor value %d which is below the minimum %d"
,
lightSensorReading
,
lightSensorReading
,
ADC_LEVEL_SLEEP
);
ADC_LEVEL_SLEEP
);
if
(
le_ulpm_BootOnAdcConfigure
(
if
(
le_ulpm_BootOnAdc
(
LIGHT_SENSOR_ADC_NUM
,
LIGHT_SENSOR_ADC_NUM
,
LIGHT_SENSOR_SAMPLE_INTERVAL_MS
,
LIGHT_SENSOR_SAMPLE_INTERVAL_MS
,
0
,
0
.0
,
ADC_LEVEL_WAKEUP
)
!=
LE_OK
)
ADC_LEVEL_WAKEUP
)
!=
LE_OK
)
{
{
LE_ERROR
(
"Failed to configure ADC3 as a wakeup source"
);
LE_ERROR
(
"Failed to configure ADC3 as a wakeup source"
);
return
;
return
;
}
}
if
(
le_ulpm_BootOnAdcSetEnabled
(
LIGHT_SENSOR_ADC_NUM
,
true
)
!=
LE_OK
)
{
LE_ERROR
(
"Couldn't enable ADC3 as wakeup source"
);
return
;
}
auto
shutdownResult
=
le_ulpm_ShutDown
();
auto
shutdownResult
=
le_ulpm_ShutDown
();
switch
(
shutdownResult
)
switch
(
shutdownResult
)
{
{
...
@@ -168,8 +159,14 @@ COMPONENT_INIT
...
@@ -168,8 +159,14 @@ COMPONENT_INIT
char
emoji
[
emojiLength
]
=
{
0
};
char
emoji
[
emojiLength
]
=
{
0
};
LE_ASSERT_OK
(
le_utf8_EncodeUnicodeCodePoint
(
UnicodeTiredFace
,
emoji
,
&
emojiLength
));
LE_ASSERT_OK
(
le_utf8_EncodeUnicodeCodePoint
(
UnicodeTiredFace
,
emoji
,
&
emojiLength
));
char
dateTime
[
128
];
LE_ASSERT_OK
(
le_clk_GetLocalDateTimeString
(
LE_CLK_STRING_FORMAT_DATE_TIME
,
dateTime
,
sizeof
(
dateTime
),
NULL
));
char
imei
[
32
];
LE_ASSERT_OK
(
le_info_GetImei
(
imei
,
sizeof
(
imei
)));
std
::
ostringstream
tweetStream
;
std
::
ostringstream
tweetStream
;
tweetStream
<<
emoji
<<
"
I'm just waking up at Sierra Wireless Developer Day 2016. #SierraDD2016"
;
tweetStream
<<
emoji
<<
"
mangOH with IMEI="
<<
imei
<<
" has woken up at "
<<
dateTime
;
auto
tweet
=
std
::
make_shared
<
std
::
string
>
(
tweetStream
.
str
());
auto
tweet
=
std
::
make_shared
<
std
::
string
>
(
tweetStream
.
str
());
if
(
wakeupAndTweet_ConnectAndRun
([
tweet
]{
if
(
wakeupAndTweet_ConnectAndRun
([
tweet
]{
SendTweet
(
tweet
->
c_str
());
SendTweet
(
tweet
->
c_str
());
...
...
samples/tutorials/developerDay2016/developerDay2016.sdef
View file @
e3a42fb9
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
apps:
apps:
{
{
// Platform services.
// Platform services.
$LEGATO_
ROOT/apps/platformServices/airVantage/avcService
$LEGATO_
SERVICE_AVC_APP
$LEGATO_ROOT/apps/platformServices/cellNetService
$LEGATO_ROOT/apps/platformServices/cellNetService
$LEGATO_ROOT/apps/platformServices/dataConnectionService
$LEGATO_ROOT/apps/platformServices/dataConnectionService
$LEGATO_ROOT/apps/platformServices/fwupdateService
$LEGATO_ROOT/apps/platformServices/fwupdateService
...
@@ -17,6 +17,7 @@ apps:
...
@@ -17,6 +17,7 @@ apps:
$LEGATO_ROOT/apps/platformServices/powerMgr
$LEGATO_ROOT/apps/platformServices/powerMgr
$LEGATO_ROOT/apps/platformServices/secStore
$LEGATO_ROOT/apps/platformServices/secStore
$LEGATO_ROOT/apps/platformServices/gpioService
$LEGATO_ROOT/apps/platformServices/gpioService
$LEGATO_ROOT/apps/platformServices/fsService
$LEGATO_ROOT/apps/sample/lwm2mAirVantageControl/lwm2mControl
$LEGATO_ROOT/apps/sample/lwm2mAirVantageControl/lwm2mControl
...
@@ -30,7 +31,7 @@ apps:
...
@@ -30,7 +31,7 @@ apps:
commands:
commands:
{
{
cm = tools:/
bin
/cm
cm = tools:/
scripts
/cm
fwupdate = tools:/bin/fwupdate
fwupdate = tools:/bin/fwupdate
secstore = tools:/bin/secstore
secstore = tools:/bin/secstore
pmtool = tools:/bin/pmtool
pmtool = tools:/bin/pmtool
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment