I posted this in developers but didn't get a nibble so O thought I"d try here.
I wanted to modify an applet that has some submenu items.
I wanted to allow the user to add these submenu items to "home".
My change seems to work fine but the remote gives an off a buzz when I call them through the new Home Menu items directly, I think indicating an error of some sort.
Calling through the SubMenu items also works fine but with no buzz.
If there is a better way to "register" a submenu to be available to the user customized Home I'm all ears.
To make the change all I did was
I added the 2nd and 3rd AddItems below to MeridianIRMeta.Lua
function registerApplet(meta)
jiveMain:addItem(meta:menuItem('MeridianIRApplet', 'home', "Meridian IR", function(applet, ...) applet:menu(...) end, 22))
jiveMain:addItem(meta:menuItem('MeridianIRAppletOf f', 'MeridianIRApplet', "Meridian Off", function(applet, ...) applet:MeridianOff(...) end))
jiveMain:addItem(meta:menuItem('MeridianIRAppletOn ', 'MeridianIRApplet', "Meridian On", function(applet, ...) applet:MeridianOn(...) end))
end
I then added these two functions to MeridianIRApplet.Lua
function MeridianOn(self, menuItem)
os.execute("/usr/bin/testir " .. audioOn)
end
function MeridianOff(self, menuItem)
os.execute("/usr/bin/testir " .. audioOff)
end
Original Code below in MeridianIRApplet.Lua file
function menu(self, menuItem)
local window = Window("window", "Meridian IR")
local menu = SimpleMenu("menu", {
{
text = "Meridian On",
icon = Choice("choice",
{" ", " "},
function(self1, selectedIndex)
os.execute("/usr/bin/testir " .. audioOn)
end,
1)
},
{
text = "Meridian Off",
icon = Choice("choice",
{" ", " "},
function(self1, selectedIndex)
os.execute("/usr/bin/testir " .. audioOff)
end,
1)
},
...
})
window:addWidget(menu)
window:show()
end
Thanks
Results 1 to 2 of 2
-
2009-04-28, 08:48 #1
Need help with Lua/JiveDuet Applet
Transporter/DuetController > SPDIF > Meridian G68 > DSP6000, DSP5500HC, DSP5000
"It's the speakers and room stupid".
My Transporter Setup
Hitch Hikers Guide to Meridian
-
2009-04-29, 08:27 #2
Turns out there was nothing wrong.
I was told that if you plugin headphones and use the IR you will hear a loud buzz and that when I made the change above I somehow turned on the speaker and the same buzz is coming out the speaker. I thought to myself no way the change I did turned on the speaker.
But in fact I did, indirectly. The change was to allow items to run from the home menu. And Home Menu items turn on the speaker for a Beep tone. The IR is being sent while the beep tone is emmitted and you get the IR noise over the speaker.Transporter/DuetController > SPDIF > Meridian G68 > DSP6000, DSP5500HC, DSP5000
"It's the speakers and room stupid".
My Transporter Setup
Hitch Hikers Guide to Meridian

Reply With Quote
