Page 1 of 5 12345 LastLast
Results 1 to 10 of 43

Thread: RR new feature - switch day/night skin

  1. #1
    Constant Bitrate
    Join Date
    Sep 2003
    Location
    LA, CA
    Posts
    140

    RR new feature - auto select day/night skin on Load

    Guino
    i had a chance to look you sourcecode...
    and add some lines...
    RR now loads day or night skin depending on the time in RR.ini
    and another thing
    when RR enters into FreeDrive, FreeDrive Map color will be changed as well...
    in order to do this
    add these lines in RR.ini

    nightskin="...." // must be set to valid skin
    autoskin=true
    daystart=0600
    nightstart=1800
    gpsmode=2 //gps setting must be set for FreeDrive

    oh...
    and FreeDrive has to be running backgound before RR launchs it.
    i just used "FreeDrive /hidden" in startup folder

    can someone host this rr.exe file?
    pm me, i will email it...

    and Guino
    you might want my code for future version..?

    let me know...

  2. #2
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    Send me your CHANGES and I'll look over it... the reason why I haven't worked on this yet is because I want to make it well done ... possibly using lat/long GPS coordinates to calculate sunset time and adjust accordingly for daylight savings ..
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  3. #3
    Constant Bitrate
    Join Date
    Sep 2003
    Location
    LA, CA
    Posts
    140
    Quote Originally Posted by guino
    Send me your CHANGES and I'll look over it... the reason why I haven't worked on this yet is because I want to make it well done ... possibly using lat/long GPS coordinates to calculate sunset time and adjust accordingly for daylight savings ..
    without the line 'AUTOSKIN=TRUE'
    RR will act as before...
    then you might want to get datsatart and nightstart value from GPS
    rather than from rr.ini
    now it checks time and switches skin
    but still skin can be changed in skin browser
    AUTOSKIN will not work until skin is set back to right skin( day or night )

    here is what i changed i marked BOLD for changes

    [modRoadRunner / Declarations]
    .
    .
    .
    Public AUTO_SKIN As Boolean 'Auto Skin by Time
    Public DAY_SKIN As String 'Day Skin Path
    Public DAY_START As String 'Day Skin Start Time
    Public NIGHT_SKIN As String 'Night Skin Path
    Public NIGHT_START As String 'Night Skin Start Time
    .
    .
    .
    .
    'Set Default Settings
    AUTO_SKIN = False
    .
    .
    .


    [modRoadRunner / Exec]
    .
    .
    .

    Select Case GPSMode
    Case 0
    CODE = "load;destinator_gps.skin;Map Monkey;" + MapMonkey_PATH + ";Map Monkey -"
    Case 1
    CODE = "load;mappoint_gps.skin"
    Case 2
    CODE = "load;external_gps.skin;External GPS;" + GPS_PATH + ";" + GPS_NAME
    If AUTO_SKIN Then COMSend "FreeDrive", IIf(SKIN_PATH = DAY_SKIN, "DAY", "NIGHT")
    Case 3
    CODE = "menu;gps_menu.skin;g.p.s."
    End Select
    .
    .
    .
    Case "select"
    If Frm.Tag = "skin_browser.skin" Then
    'Switch Skin
    SKIN_PATH = Frm.DL.Path + Frm.DL.Text + "\"
    tmp = Format(time, "hhmm")
    If LCase(SKIN_PATH) = LCase(IIf(tmp > DAY_START And tmp < NIGHT_START, DAY_SKIN, NIGHT_SKIN)) Then
    AUTO_SKIN = True
    Else
    AUTO_SKIN = False
    End If

    'Garantee
    Unload frmMP


    .
    .
    .


    [modRoadRunner / UpdateScreen]
    .
    .
    .
    Dim tmp As String
    .
    .
    .
    On Error Resume Next

    'Make sure it's for current screen and it is visuble (no point in updating a hidden window)
    If CurSCR <> F.Tag Or Not F.Visible Then Exit Sub

    'Check for time to switch AUTOSKIN
    tmp = Format(time, "hhmm")
    If AUTO_SKIN And LCase(SKIN_PATH) <> LCase(IIf(tmp > DAY_START And tmp < NIGHT_START, DAY_SKIN, NIGHT_SKIN)) Then
    SKIN_PATH = IIf(SKIN_PATH = DAY_SKIN, NIGHT_SKIN, DAY_SKIN)

    Unload frmMP

    'Unload All forms in order
    t = UBound(Menus)
    While t >= 0
    If Menus(t).Tag = "destinator_gps.skin" And MMRunning Then Menus(t).Visible = True: DoEvents: Unload frmMM
    If Menus(t).Tag = "mappoint_gps.skin" Then: S = "MapPoint"
    Unload Menus(t)
    t = t - 1
    Wend

    'Allows time for unloadings
    DoEvents

    'Now Load Menu
    ReDim Menus(0)
    Set Menus(0) = New frmSkin
    LoadSkin SKIN_PATH, "menu.skin", Menus(0)
    Menus(0).ShowForm
    CurSCR = "menu.skin"
    CallList = "menu.skin": CallCommands = "main"
    ReloadList = True

    End If

    With F

    'Application position/size (always show/hide window as prevention)
    .
    .
    .


    [frmLoader / Load]
    .
    .
    .
    Dim tmp As String
    .
    .
    .
    AUTO_SKIN = False
    .
    .
    .
    'Check if Skin path was saved, if so, restore it
    t = GetINILine(MyPath + "resume.ini", 5)
    If AUTO_SKIN Then
    tmp = Format(time, "hhmm")
    SKIN_PATH = IIf(tmp > DAY_START And tmp < NIGHT_START, DAY_SKIN, NIGHT_SKIN)
    Else
    If t <> "" And t <> "OVER" Then SKIN_PATH = t
    End If
    .
    .
    .


    [frmLoader / LoadSettings]
    .
    .
    .
    Case "autoskin"
    AUTO_SKIN = Trim(dt(1))
    Case "skinpath"
    SKIN_PATH = Trim(dt(1))
    If Right(SKIN_PATH, 1) <> "\" Then SKIN_PATH = SKIN_PATH + "\"
    DAY_SKIN = SKIN_PATH
    Case "daystart"
    DAY_START = Trim(dt(1))
    Case "nightskin"
    NIGHT_SKIN = Trim(dt(1))
    If Right(NIGHT_SKIN, 1) <> "\" Then NIGHT_SKIN = NIGHT_SKIN + "\"
    Case "nightstart"
    NIGHT_START = Trim(dt(1))
    .
    .
    .


    [RR.ini]
    .
    .
    .
    autoskin=true
    daystart=0600
    nightstart=1800
    .
    .
    .

  4. #4
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    I'm not sure if you noticed but there are already settings for the switching times in general.ini (for each skin)... that ini is partially parsed on LoadSkin() ... this would allow different skins to be used on different times... also, there's no need to repeat the code to switch the skin on updatescreen... I'd recommend checking the time on the timer in frmskin and if the time has been reached just execute the "NIGHTSKIN" or "DAYSKIN" command to switch to the skin setup in RR.INI (set by RRConfig)... I do like the fact you have inniciative..
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  5. #5
    Constant Bitrate
    Join Date
    Sep 2003
    Location
    LA, CA
    Posts
    140
    Quote Originally Posted by guino
    I'm not sure if you noticed but there are already settings for the switching times in general.ini (for each skin)... that ini is partially parsed on LoadSkin() ... this would allow different skins to be used on different times... also, there's no need to repeat the code to switch the skin on updatescreen... I'd recommend checking the time on the timer in frmskin and if the time has been reached just execute the "NIGHTSKIN" or "DAYSKIN" command to switch to the skin setup in RR.INI (set by RRConfig)... I do like the fact you have inniciative..
    guino
    thank you for your recommendation...
    i like you new beta but i lost my new feature...
    i did change few things as you've recommended...
    and now when AutoSkin changes skin it restores the current menu screen...
    all procedures in this feature acts only if "autoskin" is set to "true"
    can you implement these line in your next beta?
    here we go again...



    [modRoadRunner / Declarations]
    .
    .
    .
    Public AUTO_SKIN As Boolean 'Auto Skin by Time
    Public DAY_SKIN As String 'Day Skin Path
    Public DAY_START As String 'Day Skin Start Time
    Public NIGHT_SKIN As String 'Night Skin Path
    Public NIGHT_START As String 'Night Skin Start Time
    .
    .
    .
    .
    .
    .
    'Set Default Settings
    AUTO_SKIN = False
    .
    .



    [modRoadRunner / Exec]
    .
    .
    .
    Case "select"
    If Frm.Tag = "skin_browser.skin" Then
    'Switch Skin
    SKIN_PATH = Frm.DL.Path + Frm.DL.Text + "\"

    tmp = Format(time, "hhmm")
    If LCase(SKIN_PATH) = LCase(IIf(tmp > DAY_START And tmp < NIGHT_START, DAY_SKIN, NIGHT_SKIN)) Then
    AUTO_SKIN = True
    Else
    AUTO_SKIN = False
    End If


    'Garantee
    Unload frmMP
    .
    .
    .
    'Set form name to go to
    S = IIf(dt(1) = "dvd", "video_player.skin", dt(1))

    'check autoskin and update skin
    If AUTO_SKIN And S = "external_gps.skin" Then Call COMSend("FreeDrive", IIf(SKIN_PATH = DAY_SKIN, "DAY", "NIGHT"))


    'Speak if text available and not already on this screen (i.e. from menu)
    If UBound(dt) > 1 And InStr(1, CallList, S) = 0 Then Speak dt(2)
    .
    .
    .


    [frmLoader / Load]
    .
    .
    .
    Dim tmp As String
    .
    .
    .
    AUTO_SKIN = False
    .
    .
    .
    'Check if Skin path was saved, if so, restore it
    t = GetINILine(MyPath + "resume.ini", 5)

    'check if auto skin is on, if so apply skin by time set
    If AUTO_SKIN Then
    tmp = Format(time, "hhmm")
    SKIN_PATH = IIf(tmp > DAY_START And tmp < NIGHT_START, DAY_SKIN, NIGHT_SKIN)
    Else
    If t <> "" And t <> "OVER" Then SKIN_PATH = t
    End If

    .
    .
    .


    [frmLoader / LoadSettings]
    .
    .
    .

    Case "skinpath"
    SKIN_PATH = Trim(dt(1))
    If Right(SKIN_PATH, 1) <> "\" Then SKIN_PATH = SKIN_PATH + "\"
    DAY_SKIN = SKIN_PATH
    Case "nightskin"
    NIGHT_SKIN = Trim(dt(1))
    If Right(NIGHT_SKIN, 1) <> "\" Then NIGHT_SKIN = NIGHT_SKIN + "\"
    Case "autoskin"
    AUTO_SKIN = Trim(dt(1))
    Case "daystart"
    DAY_START = Trim(dt(1))
    Case "nightstart"
    NIGHT_START = Trim(dt(1))

    .
    .
    .


    [frmSkin / TimerUpdate]
    .
    .
    .
    'Make sure we're current screen
    If CurSCR <> Me.Tag Or Not Me.Visible Then Exit Sub

    'Check for time to switch AUTOSKIN
    tmp = Format(time, "hhmm")
    If AUTO_SKIN And LCase(SKIN_PATH) <> LCase(IIf(tmp > DAY_START And tmp < NIGHT_START, DAY_SKIN, NIGHT_SKIN)) Then
    tmp = Menus(IsLoaded(CurSCR)).Tag
    Call Exec(Chr(34) + IIf(SKIN_PATH = DAY_SKIN, "nightskin", "dayskin") + Chr(34), Menus(IsLoaded(CurSCR)))
    Call Exec(Chr(34) + "load;" + tmp + Chr(34), Menus(IsLoaded(CurSCR)))
    End If


    'Load Tags (if needed)
    If LazyTag Then PL_Scrolled
    .
    .
    .

  6. #6
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    I'll definitely look into it.. I'm still not done with the changes... there's one more optimization I need to work on.. then I can probably fit your changes into it..
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  7. #7
    Constant Bitrate
    Join Date
    Sep 2003
    Location
    LA, CA
    Posts
    140
    Quote Originally Posted by guino
    I'll definitely look into it.. I'm still not done with the changes... there's one more optimization I need to work on.. then I can probably fit your changes into it..
    thank you...
    oh and i have a question...
    you rr.exe is only 370kb...
    how did you comile that small?
    when i comile i get 1.5mb... (if native code)
    530Kb...(if P-Code)
    i am using microsoft VB6 SP6...


    let me know when you look into my code
    i am keep changing to optimize it

  8. #8
    Constant Bitrate
    Join Date
    Sep 2003
    Location
    LA, CA
    Posts
    140
    Guino
    thank you again for your information...
    i don't know how you like my idea to implement this feature...
    here is what i did to boost volume by reading speed from FreeDrive...
    also i add one more choice to bond master volume to wave together...
    i had to change 'All Line' to -2 and Master&Wave to -1
    can you put this item between 'All Lines' and 'Wave' and subtract 1 more for the value in RRConfig.exe?


    setting will be located in

    [DynEQ.ini]
    .
    .
    VolBoost=true
    OriginalVolMap=PC Speaker
    DoubleAt=200

    .
    .

    to enable this feature
    add line 'VolBoost=true'

    basically i map the original volume to 'PC Speaker'
    any line not using will store original volume.
    just pick one from the MapMasterVolume listed on RRConfig.exe

    and the 'DoubleAt=200' sets the ratio which means volume will be doubled at speed of 200mph
    so ideally, volume will be increased by 50% at 100mph and 25% at 50mph


    [frmLoader / LoadDynEQ]
    .
    .
    .
    Case "minvol"
    MinEQVol = Val(Trim(dt(1)))
    Case "volboost"
    VolBoost = CBool(Trim(dt(1)))
    Case "originalvolmap"
    OriginalVolMap = IDXName(dt(1))
    Case "doubleat"
    Ratio = Val(Trim(dt(1)))

    Case Else
    'EQ settings
    If left(LCase(dt(0)), 2) = "eq" And Len(LCase(dt(0))) = 3 Then
    EQMax(Val(Mid(dt(0), 3, 1))) = Val(Trim(dt(1)))
    End If
    End Select
    .
    .
    .


    [frmSkin / Timer]
    .
    .
    .
    If VolBoost Then SetDynVol MasterVolMap, OriginalVolMap

    'Run Indicator Update (This function has built in control to run every .2 sec)
    UpdateIndicators
    .
    .
    .


    [modMixer / Declarations]
    .
    .
    .
    'Master Volume is mapped into this line or including Master Volume (if -2) or ALL (if -2)
    Public MasterVolMap As Integer
    Public OriginalVolMap As Integer
    Public VolBoost As Boolean ' Use Volume Boost by Speed ?
    Public Ratio As Long

    .
    .
    .
    Public Sub DoVol(ByVal idx As Integer, Optional UP As Boolean = True)
    Dim AllLines As Boolean
    Dim Both As Boolean
    Dim VolPct As Long
    Dim tmp As Integer

    'Get Current Volume info
    GetMixerInfo

    AllLines = (idx = -2)
    Both = (idx = -1)
    tmp = idx
    idx = IIf(VolBoost, OriginalVolMap, Abs(idx))


    'This will look "Funky" but this is a conditional For Loop!
    If Not AllLines Then GoTo SingleLine
    For idx = 0 To UBound(MixerState)
    SingleLine:
    .
    .
    .
    If Not AllLines Then GoTo SingleLineEnd
    Next idx
    Exit Sub
    SingleLineEnd:
    If VolBoost Then
    SetDynVol tmp, idx
    ElseIf Both Then
    MixerState(0).MxrVol = MixerState(Abs(idx)).MxrVol
    AdjustOutput 0: GetMixerInfo
    End If

    End Sub

    Public Sub SetDynVol(ByVal idx As Integer, ByVal ori As Integer)
    Dim Both As Boolean
    Both = (idx = -1)
    MixerState(Abs(idx)).MxrVol = MixerState(ori).MxrVol * (1 / IIf(Ratio < 1, 1, Ratio) * COMSend("FDSDK", "REQUEST:FDSPEED:RoadRunner") + 1)
    AdjustOutput Abs(idx): GetMixerInfo
    If Both Then
    MixerState(0).MxrVol = MixerState(Abs(idx)).MxrVol
    AdjustOutput 0: GetMixerInfo
    End If
    End Sub

  9. #9
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,817
    That's a good start, but there'll have to be settings for Min and Max vol range, Min and Max Speed Range.. and the desired Gain... otherwise I won't stop hearing complaints about it... There's also the fact that COMSend does not RETURN anything immediately it sends out a request and the response comes in whenever FD feels like sending it..

    The Master&Wave setting is rather useless since you can MAP the master volume to ANY audio line (including Wave), basically doing the same thing..

    The way this will have to work, is by FIRST verifying the data in the GPS Structure is VALID, and then IF Valid proceed with adjustments based on the GPS Speed (which can be obtained from FD)... this is so the feature works the same with Mappoint, MM and FD.. I have to ask CDR to send out GPS data to RR so I can parse it or at least send out if the GPS data is Valid or Invalid (no lock) so I can process it accordingly using lat/long/heading/speed info...

    I do like that your iniciative though...
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  10. #10
    FreeDrive Creator CdRsKuLL's Avatar
    Join Date
    Feb 2004
    Location
    Manchester
    Posts
    3,509
    I have now integrated winamp control into freedrive 0.84, its wouldnt take much code to attach a volume control to the speed, but will be happy to send out any info required including the gps info. let me know how you want it.. ie comsend or some other way.

    cheers

    CdR

Page 1 of 5 12345 LastLast

Similar Threads

  1. Open Source Skin Editor for RR
    By lbooker in forum Road Runner
    Replies: 66
    Last Post: 04-16-2007, 01:51 AM
  2. Requests..... Please
    By camsgs3 in forum Centrafuse
    Replies: 299
    Last Post: 07-28-2005, 02:22 AM
  3. HELP - big RR skin site (a new one)
    By Caitlin in forum Road Runner
    Replies: 19
    Last Post: 05-10-2005, 06:07 PM
  4. RR 2-19-05 .. little things..
    By guino in forum Road Runner
    Replies: 34
    Last Post: 02-20-2005, 12:55 AM
  5. Arby Skin - Feature Request
    By nolmscheid in forum Software & Software Development
    Replies: 0
    Last Post: 11-11-2002, 06:10 PM

Bookmarks

Posting Permissions

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