missing rrsensorapi.h for gathering sensor data from N97 Nokia device - symbian

I am quite new with symbian and c++. I try to use sensor on N97 device. I got error that rrsensorapi.h is not found. I have check through epoc folder it not there either. In this case, how can I find rrsensorapi?
I have sensor.pri file like this
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
HEADERS += xqsensor.h \
xqaccsensor.h \
xqdeviceorientation.h \
xqdeviceorientation_p.h
SOURCES += xqsensor.cpp \
xqaccsensor.cpp \
xqdeviceorientation.cpp \
xqdeviceorientation_p.cpp
exists($${EPOCROOT}epoc32/release/winscw/udeb/RRSensorApi.lib)| \
exists($${EPOCROOT}epoc32/release/armv5/lib/RRSensorApi.lib) {
message( "Building for Sensor plugin" )
DEPENDPATH += .\plugin
HEADERS += xqsensor_p.h \
xqaccsensor_p.h
SOURCES += xqsensor_p.cpp \
xqaccsensor_p.cpp
symbian:LIBS += -lRRSensorApi
} else {
message("Warning: Sensor API not found!")
}

As quoted on the Forum Nokia Discussions website, the RRSensorAPI works only with SOME S60 3rd Edition FP1 devices... Info here.
The API's for sensors on S60v5 have been changed... To solve your question of using sensors with the N97 (S60 5th Edition), refer to this wiki document on Forum Nokia.
Hope this helps...

Related

Robot Framework: How do I direct my test results to an external file?

I have a functioning Robot Framework test that searches for identified elements in a list and then logs their presence or absence to the console. This has been working just fine for me so far. But now I need that console output directed to a file.
I have used the LOG keyword, I've used LOG MANY keyword and I've tried to also use APPEND TO FILE to get this done. I'm wondering at this point if my issue is the list/search logic itself. I can have individual commands logged or appended no problem. Even looking at the generated log.html file, only those basic log commands show up. Not the console output. Here's the keyword in question. And just to note, the search logic is sound. My problem is how to LOG what normally shows in the console to a file.
***Test Keyword***
Log "TEST MENU ----"
${StaList}= Create List test1 test2 test3 test4 test5 test6
FOR ${a} IN #{StaList}
${p}= Run Keyword And Return Status Page Should Contain Element xpath=//*
[contains(text(), "${a}")]
Run Keyword If ${p} Log "(${a}) X" ELSE Log "(${a}) "
END
When I run this with "Log To Console", this is what I get. A running list showing me if an element is present (with X) or absent (without X).
"TEST MENU ----
"(test1) X"
"(test2) "
"(test3) X"
This works fine if its just me running it. But I need this output sent to a text file to deliver to my team. I've been at this for a while now and need some help. Anybody have any ideas? Thanks so much!
Log to Console, does just that. It shows in Console but not in log.html.
What you want is to duplicate your step to APPEND TO FILE, so you have in Console and in the file.
You need to add \n or ${ENTER} to your output strings.
EDIT: Here is a fully working example:
*** Settings ***
Suite Setup Create and Open Page
Suite Teardown Close All Browsers
Library SeleniumLibrary
Library OperatingSystem
*** Test Cases ***
Example Test
Verify Elements
*** Keywords ***
Verify Elements
Log To Console "TEST MENU ----"\n
Create File test_menu.txt TEST MENU ----\n
${StaList}= Create List test1 test2 test3 test4 test5 test6
FOR ${a} IN #{StaList}
${p}= Run Keyword And Return Status Page Should Contain Element xpath=//*[contains(text(), "${a}")]
Run Keyword If ${p} Log To Console "(${a}) X"\n
... ELSE Log To Console "(${a}) "\n
Run Keyword If ${p} Append To File test_menu.txt (${a}) X\n
... ELSE Append To File test_menu.txt (${a}) \n
END
Log The result is test_menu.txt html=True
Create and Open Page
Create File my_mock.html
Append To File my_mock.html <HTML>\n \ \ \ <BODY>\n \ \ \ \ \ \ \ <p>test2</p>\n \ \ \ \ \ \ \ <p>test4</p>\n \ \ \ \ \ \ \ <p>test5</p>\n \ \ \ </BODY>\n</HTML>
Open Browser file://${CURDIR}/my_mock.html
You should replace Run Keyword If by IF/ELSE/END blocks.

modifying u-boot environment for alternating boot

I’ve got an embedded device where I would like to implement an alternating boot mechanism to make sure that an executable operating system is always present (e.g. after an invalid update) Therefore at every reboot the bootloader should switch between the partitions mmcblk1p1 and mmcblk1p2 .
mmcblk1p1 – rootfs 1 (OS + Application (read only))
mmcblk1p2 –
rootfs 2 (OS + Application (read only) (mirrored))
mmcblk1p3 - Data (rw)
To realise this I’ve enabled the bootcount variable in the u-boot config to increase bootcount +1 after every reboot (this is already working). My plan was to use the bootlimit mechanism provided by the bootloader (https://www.denx.de/wiki/DULG/UBootBootCountLimit) to call a function called altbootcmd to change the boot partition and to reset bootcount, but unfortunately the bootlimit mechanism is not supported for ARM processors:
So my plan is now to define a simple if else statement in the CONFIG_EXTRA_ENV_SETTINGS statement in the header file (that adds support fro my board) under /include/configs/board_xy_config.h and then to compile the bootloader. (Explanatory notes: mmcpart is the number of the partition)
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_MFG_ENV_SETTINGS \
"if test ${bootcount} = 1; then " \
"setenv mmcpart 1; " \
"else " \
"if test ${bootcount} = 2; then " \
"setenv mmcpart 2; " \
"else " \
"setenv mmcpart 1; " \
"setenv bootcount 1; " \
"fi;" \
"fi; " \
Unfortunately this approach also doesn't work. fw_printenv shows me that bootcount variable gets increased at every reboot, but neither the mmcpart variable nor the bootcount variable get changed after several reboots. I am manually able to switch between the partitions using “fw_setenv mmcpart x”, but it seems that the if else statement doesn't get called.
Does someone know what I am doing wrong here?

SSML code in Curl text to speech IBM Watson

I am trying to use IBM Watson Text to Speech because I need to get some audio file to insert in a video but I am not a developer, at all! Looking a the scarce tutorial provided on IBM cloud website, I figured out how to get the audio file using curl. But I cannot find a way to use the SSML possibilities to modify the voice. I don't understand where we have to specify the tags in the code. Here is the code I use, it works to produce the audio file. Where should I insert the tags to customize the voice?... Any help would be more than welcome! Many thanks in advance
curl -X POST -u "credential OK":"credential ok" \
--header "Content-Type: application/json" \
--header "Accept: audio/mp3" \
--data '{"text": "The visceral leishmaniasis, also known as kala-azar is characterized by irregular bouts of fever, substantial weight loss, swelling of the spleen and liver, and anaemia. Visceral leishmaniasis is fatal in over 95% of cases if left untreated."}' \
--output Essai.mp3 \
"https://stream.watsonplatform.net/text-to-speech/api/v1/synthesize?voice=en-US_AllisonVoice"\
You put the SSML tags round the text that it need to be applied to
eg. for your example
--data '{"text": "<express-as type='GoodNews'> The visceral leishmaniasis, also known as kala-azar </express-as> is characterized by irregular bouts of fever, substantial weight loss, swelling of the spleen and liver, and anaemia. Visceral leishmaniasis is fatal in over 95% of cases if left untreated."}'
I know this answer is late in coming but it might help someone else with the same problem.
--data "{\"text\": \"<voice-transformation type='Custom' breathiness='35%' pitch='-80%' pitch_range='60%' glottal_tension='-40%' ><p><s>The visceral leishmaniasis, <break strength='500ms'></break>also known as kala-azar, <break strength='500ms'></break> <express-as type='Uncertainty'>is characterized by irregular bouts of fever, substantial weight loss, swelling of the spleen and liver, and anaemia.</express-as></s> <s>Visceral leishmaniasis is fatal in over 95% of cases if left untreated.</s></p></voice-transformation>\"}" \
I believe the reason that the example provided by chughts did not work, may be because of improper escaping of quotes in the JASON object. *Also please note that the the express-as element only works with the en-US_AllisonVoice.
Personally I can't tell the difference in the voice using any of the express-as element type options. FWIW, I much prefer the en-US_LisaV3Voice, but you can't use voice-transformations with the V3 voices.

In Bluez A2DP: how can I modify the default audio sample rate

I am using Bluez4 to sink Audio from an iphone 5 to a Raspberry pi audio output.
The default settings for BLuez 4 A2DP appear to be S16_LE, 44,1kHz Stereo.
Similar to other posts about Bluez, I can't catch Select_Configuration DBus messages in order to change the sample rate dynamically. Instead I decided to try to find the default A2DP sample rate in the BLuez Stack.
Does anyone know where the default sample rate is set? My first thought was that it was in the BLuez/audio/ folder but nothing appears to change the default 44.1kHz sample rate.
Now I'm very curious to know where it is set.
Currently using this: sudo ./a2dp-alsa --sink | aplay -c 2 -r 44100 -f S16
would like to use this sudo ./a2dp-alsa --sink | aplay -c 2 -r 16000 -f S16
I came across these lines in a2dp-alsa.c
/* Initialise connection to ALSA */
g_handle = audio_init("hw:0,0", 48000);
maybe its hard coded in a2dp-alsa - not parameterizable

Comparing 2 pdf's - Error

I've to compare two pdf's visually and get the output pdf. For this, I tried the steps mentioned in some other link which mentioned below.
Comparison of two pdf files
I installed ImageMagick, pdftk, Ghostscript. while trying to compare, using the above mentioned cmd,
compare \
-verbose \
-debug coder -log "%u %m:%l %e" \
somewhere/firstpdf_page_001.pdf \
somewhere/2ndpdf_page_001.pdf \
-compose src \
somewhereelse/diff_page_001.pdf
I'm getting the error.
C:\pdftk\ImageMagick-6.7.3-Q16>compare -verbose -debug coder -log "%u %m:%l %e" "C:\Users\velprakashk\Desktop\Velu\test.pdf" "C:\Users\velprakashk\Desktop\Velu\ test2.pdf" -composite src "C:\Users\velprakashk\Desktop\Velu\rrr.pdf" Magick: no decode delegate for this image format C:\Users\velprakashk\Desktop\V elu\test.pdf' # error/constitute.c/ReadImage/532. Magick: no decode delegate for this image formatC:\Users\velprakashk\Desktop\V elu\test2.pdf' # error/constitute.c/ReadImage/532.
Can anyone guide me... My 2 pdf's to be compared are having 1 page only...