Page 7 of 7 FirstFirst ... 567
Results 61 to 68 of 68

Thread: Device Manager for Receiver done now want FlatSytle ccf working

  1. #61
    Join Date
    May 2001
    Posts
    697

    Default

    Rob

    Is their a way to tell the provider it has a -100 0 100 slider scale ie like a balance slider for example which does this already?

    If not I will rescale it in the plugin and deal with it that way

    Cheers Rick
    Rickd

  2. #62
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    Hmm... that's odd - I thought I'd posted the fix for this - here's a replacement for luascript\DeviceManager\Devices\AudioVisual.lua
    Attached Files Attached Files
    --Rob

  3. #63
    Join Date
    May 2001
    Posts
    697

    Default

    Thanks Rob that workd ...how do I turn a -ve number positive in lua?

    eg if it equals -1 how do I make it +1 ie remove the negitive values?
    Rickd

  4. #64
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    You can use math.abs() to do that.
    --Rob

  5. #65
    Join Date
    May 2001
    Posts
    697

    Default

    I have added a Dolby Digital compression command dropdown but it does not work cannot see what I am missing here is provider code

    Code:
    Controls = {
                                 Presets = {Class = 'Dropdown', ID = 'Presets', Values = PresetValues, 
    							 Command = function(value) self.Plugin['Mode'..value](self.Plugin) end},
    							 StepVolume = {Class = 'Dropdown', ID = 'StepVolume', Values = {"VolUp", "VolDown"}, 
    							 Command = function(value) self.Plugin[value](self.Plugin) end},
    							 DDCompression = {Class = 'Dropdown', ID = 'DDCompression', Values = {"On", "Off"}, 
    							 Command = function(value) self.Plugin[value](self.Plugin) end},
    							 DDialogNorm = {Class = 'Dropdown', ID = 'DDialogNorm', Values = {"Analog", "Digital"}, 
    							 Command = function(value) self.Plugin[value](self.Plugin) end},
    							Balance = {Class = 'Balance', ID = 'Balance', 
    							Command = function(value) 
    								print('Casablanca Provider Received Balance Value '..value)
    								if tonumber(value) then
                                                self.Plugin:SetPercentBalance(tonumber(value))
    							else
    								print('Casablanca Provider Received Unknown Balance Command')
    								end
    							end},
    errors as follows when event fcomes from NR:
    Code:
    ...cript\DeviceManager/Providers/ThetaCasablancaIII.lua:71: attempt to call field `?' (a nil value)
    C:\Program Files\Promixis\Girder5\luascript\DeviceManager/Providers/ThetaCasablancaIII.lua:71 in function <C:\Program Files\Promixis\Girder5\luascript\DeviceManager/Providers/ThetaCasablancaIII.lua:71>
    (tail call): ?
    [C]: in function `xpcall'
       Locals
           pfunc : function: 0CD2E570
           pargs : table: 0DDE5818
           arg : table: 0DDE5818
           func : function: 10F18A58
       Upvalues
           clearLines : function: 0CCBD950
           errorHandler : function: 15A5D100
    C:\Program Files\Promixis\Girder5\luascript\DeviceManager/Providers/Simple.lua:56 in function <C:\Program Files\Promixis\Girder5\luascript\DeviceManager/Providers/Simple.lua:51>
       Locals
           self : table: 0ACE2E10
           dev : table: 10F19178
           control : DDCompression
           _ : 42
           devPath : HTPC\CasablancaIII\Processor
           event : HTPC\CasablancaIII\Processor\DDCompression
           payloads : table: 0DDE5758
       Upvalues
           ThisMachine : HTPC
    C:\Program Files\Promixis\Girder5\luascript\DeviceManager/ConnectionManager.lua:484 in function <C:\Program Files\Promixis\Girder5\luascript\DeviceManager/ConnectionManager.lua:462>
       Locals
           modifier : 0
           device : 232
           handler : 1428
           event : HTPC\CasablancaIII\Processor\DDCompression
           payloads : table: 0DDE5758
       Upvalues
           self : table: 0ACE2E10
    C:\Program Files\Promixis\Girder5\luascript\DeviceManager/ConnectionManager.lua:103 in function <C:\Program Files\Promixis\Girder5\luascript\DeviceManager/ConnectionManager.lua:102>
    thanks
    Rickd

  6. #66
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    Assuming that this code is at line 71

    Code:
    Command = function(value) self.Plugin[value](self.Plugin) end},
    I'd want to know what the value of the parameter 'value' is - I'd expect it to 'On' or 'Off' - but you'd really want to be calling something like self.Plugin.DDCompression(self.Plugin, value) I'd have thought.

    And something similar for DDialogNorm as well.
    --Rob

  7. #67
    Join Date
    May 2001
    Posts
    697

    Default

    yes you are right that is code at 71 and yes DDCompression values are on or off

    so something like this would work?

    Code:
    DDCompression = {Class = 'Dropdown', ID = 'DDCompression', Values = {"On", "Off"}, 
    Command = function(value) self.Plugin.DDCompression(self.Plugin, value) end},
    on the plugin side

    Code:
    DDCompression=function(self,value)
    	print ("got compression")
    if value=="On" then
    		self:SendHex('01 36 00 00') end
    	end,
    Last edited by rickd; January 9th, 2009 at 03:52 PM.
    Rickd

  8. #68
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    Yes, that looks right to me.
    --Rob

Page 7 of 7 FirstFirst ... 567

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •