From: Radek Kintop Date: Mon, 7 Dec 2015 11:01:31 +0000 (+0100) Subject: Mobile radio sample documentation (addendum) X-Git-Tag: tizen_3.0/TD_SYNC/20161201~288^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ac3df138fbf8fe4665da3f8ed4252bb97722d88;p=sdk%2Fonline-doc.git Mobile radio sample documentation (addendum) Change-Id: Ifa56dfeff413b279d313b1ba1d63bd1320217bc6 Signed-off-by: Radek Kintop --- diff --git a/org.tizen.sampledescriptions/html/images/radio_screen_0.png b/org.tizen.sampledescriptions/html/images/radio_screen_0.png index 46f2cf7..6d7b5bd 100644 Binary files a/org.tizen.sampledescriptions/html/images/radio_screen_0.png and b/org.tizen.sampledescriptions/html/images/radio_screen_0.png differ diff --git a/org.tizen.sampledescriptions/html/images/radio_screen_1.png b/org.tizen.sampledescriptions/html/images/radio_screen_1.png index 22053bd..222961d 100644 Binary files a/org.tizen.sampledescriptions/html/images/radio_screen_1.png and b/org.tizen.sampledescriptions/html/images/radio_screen_1.png differ diff --git a/org.tizen.sampledescriptions/html/mobile_n/radio_sd_mn.htm b/org.tizen.sampledescriptions/html/mobile_n/radio_sd_mn.htm index eb77652..a48bc97 100644 --- a/org.tizen.sampledescriptions/html/mobile_n/radio_sd_mn.htm +++ b/org.tizen.sampledescriptions/html/mobile_n/radio_sd_mn.htm @@ -36,7 +36,8 @@ It takes some time for the radio hardware to set itself up.

You can change the frequency manually, using the knob or let the radio seek the station for you. The signal strength indicator can help you tune the radio. -To obtain the list of strongest stations frequencies, press the scan buton. Scanning turns the radio off, so afterwards you have to switch it back on manually.

+To obtain the list of strongest stations frequencies, press the scan buton. Scanning turns the radio off, so afterwards you have to switch it back on manually. +Scanning also disables all the buttons. Once it is finished, buttons return to their previous states and become enabled again.

Prerequisites

This application requires the device to support the following feature:

@@ -53,6 +54,16 @@ To obtain the list of strongest stations frequencies, press the scan buton. Scan __ui_cb(). The first one reacts to radio module changes and sets up the application view accordingly. The latter one does the opposite - it invokes radio module functions depending on user interface selections.

+

There are a few types of events generated by radio controller module:

+ +
 static void __radio_cb(radio_event event)
 {
@@ -101,6 +112,25 @@ static void __radio_cb(radio_event event)
 }
 
+

Events communicated from the view module to the main controller are as follows:

+ + +
 static void __ui_cb(ui_event event, ui_element element, const void *data)
 {
@@ -242,6 +272,9 @@ bool radio_controller_set_frequency(int freq)
 }
 
+

The __thread_function() function is called in the context of another thread. +This prevents UI lockup and allows for fluent frequency change.

+
 static void __thread_function(void *frequency, Ecore_Thread *thread)
 {
@@ -249,6 +282,9 @@ static void __thread_function(void *frequency, Ecore_Thread *thread)
 }
 
+

The __thread_end_cb() function is called when thread has finished. Since it is called in +the context of the main thread, it is possible to invoke a callback function and update the UI.

+
 static void __thread_end_cb(void *data, Ecore_Thread *thread)
 {
@@ -390,6 +426,8 @@ bool radio_controller_is_muted(bool *muted)
 }
 
+

The signal strenght is calculated in the function below. It is linearized in dBm domain. The range is from -128 to 128 dBm.

+
 bool radio_controller_get_rssi(float *strength)
 {
@@ -409,6 +447,8 @@ bool radio_controller_get_rssi(float *strength)
 }
 
+

The function below is used to get the current radio frequency.

+
 bool radio_controller_get_freq(int *freq)
 {
@@ -416,6 +456,10 @@ bool radio_controller_get_freq(int *freq)
 }
 
+

The radio_controller_get_freq_range() +function is used to get the range of frequencies the radio can operate on. +

+
 bool radio_controller_get_freq_range(int *freq_min, int *freq_max)
 {