--- /dev/null
+--[[
+ Vehicle speed property
+
+ This property has a basic type which is updated often, therefore use
+ the built-in handler.
+--]]
+
+
+amb.property {
+ name = "vehicle_speed",
+ basic_table_name = "amb_vehicle_speed", -- default: "amb_" + name
+ dbus_data = {
+ obj = "/org/automotive/runningstatus/vehicleSpeed",
+ interface = "org.automotive.vehicleSpeed",
+ property = "VehicleSpeed",
+ signature = "i",
+ },
+}
+
+
+--[[
+ Shift position property
+
+ Use custom handler for setting the stick status.
+--]]
+
+stick_handler = function (self, property)
+ -- insert or update the incoming data
+
+ print("shift position handler: " .. property)
+
+ table = self.outputs.test_table
+
+ table:replace({ id = 0, shift_position = property })
+end
+
+amb.property {
+ name = "stick_handler",
+ handler = stick_handler,
+ outputs = {
+ test_table = mdb.table {
+ name = "amb_shift_position",
+ index = { "id" },
+ create = true,
+ columns = {
+ { "id", mdb.unsigned },
+ { "shift_position", mdb.unsigned },
+ }
+ }
+ },
+ dbus_data = {
+ obj = "/org/automotive/runningstatus/transmission",
+ interface = "org.automotive.transmission",
+ property = "ShiftPosition",
+ signature = "y",
+ },
+}
end
-- define application classes
-application_class { name = "navigator", priority = 4 }
-application_class { name = "phone" , priority = 3 }
-application_class { name = "game" , priority = 2 }
+application_class { name = "navigator", priority = 8 }
+application_class { name = "event" , priority = 7 }
+application_class { name = "phone" , priority = 6 }
+application_class { name = "camera" , priority = 5 }
+application_class { name = "alert" , priority = 4 }
+application_class { name = "game" , priority = 3 }
+application_class { name = "radio" , priority = 2 }
application_class { name = "player" , priority = 1 }
application_class { name = "implicit" , priority = 0 }
cp packaging.in/murphy-lua.conf $RPM_BUILD_ROOT%{_sysconfdir}/murphy/murphy.conf
cp packaging.in/murphy.lua $RPM_BUILD_ROOT%{_sysconfdir}/murphy/murphy.lua
+# Copy plugin configuration files in place.
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/murphy/plugins/amb
+cp packaging.in/amb-config.lua \
+ $RPM_BUILD_ROOT%{_sysconfdir}/murphy/plugins/amb/config.lua
+
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
cp packaging.in/murphyd.init $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/murphyd
chmod a+x $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/murphyd