Changeset 188


Ignore:
Timestamp:
02/26/2012 01:51:00 AM (16 months ago)
Author:
reyalp
Message:

live gui - check api version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lua/gui_live.lua

    r187 r188  
    149149end 
    150150 
     151local function check_api_ver() 
     152        -- normally larger minor would be ok, but want to only work with dev version for now 
     153        if con.apiver.major == 2 and con.apiver.minor == 2 then 
     154                return true 
     155        end 
     156end 
    151157local function update_should_run() 
    152158        if not con:is_connected() or m.tabs.value ~= m.container then 
     159                return false 
     160        end 
     161        if not check_api_ver() then 
    153162                return false 
    154163        end 
     
    531540        -- basedata will be reset when the new handler is obtained 
    532541        m.livehandler = nil 
     542        if con:is_connected() then 
     543                -- TODO could disable live options 
     544                if not check_api_ver() then 
     545                        printf('camera does not support live view api\n') 
     546                end 
     547        end 
    533548end 
    534549-- check whether we should be running, update timer 
Note: See TracChangeset for help on using the changeset viewer.