maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   N900 Vibration in C (https://talk.maemo.org/showthread.php?t=83577)

sakya 2012-04-12 07:56

N900 Vibration in C
 
Hi,

is there a way to make the N900 to vibrate without using the dbus?

Many thanks.

sakya 2012-04-25 08:52

Re: N900 Vibration in C
 
No one?
Another question:
in mce.ini there's a PatternUserManual profile in VibraPatternRX51.
The comment says:
Code:

# Note: for PatternUserManual the user will send vibration details.
#      So only priority is important in the pattern
#      Rrepeat count is set to 1 since now it can't be changed by the user
#      The user will be able to set speed and OnPeriod only

My question is: how can I "set speed and OnPeriod" with the dbus call?

EDIT: Found it:
Code:

req_start_manual_vibration

/**
 * Activate user defined vibrator pattern
 *
 * @since v1.8.18
 * @param speed @c int32 @c * vibration speed, value between -255 - 255
 * @param duration @c int32 @c * vibration duration in milliseconds (0 means forever)
 */

Example:
Code:

dbus-send --system --print-reply --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_start_manual_vibration int32:150 int32:300

ade 2012-04-25 10:28

Re: N900 Vibration in C
 
Quote:

Originally Posted by sakya (Post 1191080)
Hi,

is there a way to make the N900 to vibrate without using the dbus?

Many thanks.

Do you really want to avoid dbus, or just avoid a direct dbus system call?

I saw this piece of code a while ago, (QT/C++)
http://kunalmaemo.blogspot.com/2010/...-in-maemo.html

Under the hood it will still uses dbus calls, so I don't know if it will be of use for you.

sakya 2012-04-25 20:00

Re: N900 Vibration in C
 
I was looking for some library to use the vibra without using dbus and setting speed and duration.
I solved my "problem" using the dbus call I wrote in my previous message.


All times are GMT. The time now is 18:16.

vBulletin® Version 3.8.8