VM LiveView Lite for rFactor & rFactor2

Discussion in 'Plugins' started by Frank Geyer, Feb 20, 2012.

  1. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    Hi JC,

    hard to tell if I don't have the original log files. Maybe you can PM me the logs of the loader and the web front end ... however does the Plugin produces a well formed ../VMHotlaps/CurrentScoring.xml file?

    Thanx & Cheers
    Frank
     
  2. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    Thank's Franck :p
     
  3. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    Ure welcome!
     
  4. jcarrest

    jcarrest Registered

    Joined:
    Jan 11, 2012
    Messages:
    6
    Likes Received:
    0
    I change the folder rFactor and all its ok.

    Thanks Frank!!!!!
     
  5. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,602
    Likes Received:
    88
    Hi Frank,

    I see that you have done a great job :) I'm also developing a similar system but all with Asp.Net for the community to enjoy :)

    I have a little question for you if you don't mind. Did you manage to calculate the Gap at the end of the race? If yes, how did you do it please?

    Cheers!
     
  6. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    Ure welcome and thanx for the feedback.

    Cheers
    Frank
     
  7. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    Hi Biker,

    I don't mind ;) ... but what do you mean by calculating the gap at the end of the race?

    Cheers
    Frank
     
  8. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,602
    Likes Received:
    88
    Thanks mate :)

    During the race, this field is called mTimeBehindleader. But after the race, time gap between each driver does not reflect the finish gap.

    I can get it from the xml log files but I am seeing if I can compute it from the live timing. The result is like the one shown below in yellow :)

    I tried to calculate it from adding the lap times together but its only updated every lap and looks ugly during the race :eek:
     
  9. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    If I get u right, u would like to conserve the race finish result with the "true" gap between each driver after a driver crosses the finish line and maybe save it as a race result without using the result xml file ... ? Don't get me wrong, I just want it to understand correctly.
     
  10. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,602
    Likes Received:
    88
    Yes, that's what I mean :) Well, maybe I don't really need that :)

    But it would be nice if someone is watching it live and when race is ready the finish gap is there.
     
  11. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    Not sure, but u can maybe use an additional column/variable in your db/plugin and fill it after the race status is finished with the actual mTimeBehindLeader of a driver as soon as he crosses the finish line indicated by a higher mLapStartET value as it was before ... !?!? Haven't really checked, just a 1st thought ...
     
  12. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,602
    Likes Received:
    88
    That might work. Thanks :)
     
  13. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    New version of VM LiveView Lite for rFactor & rFactor2 (11th April 2013) available. For a download link see first post.

    Have fun ...

    Cheers
    Frank
     
  14. Hoschi

    Hoschi Registered

    Joined:
    Nov 18, 2011
    Messages:
    94
    Likes Received:
    0
    Nice Frank, thx for this release !
     
  15. Jean-christophe Pires

    Jean-christophe Pires Registered

    Joined:
    Nov 1, 2012
    Messages:
    34
    Likes Received:
    0
    What I would want to make, it is to have for every TEAM the image of the car thatscrolls in the marquee and, in the monitor.
     
  16. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    @Hoschi: Ure welcome.

    @Jean: OK, I understand. Well what u can do is the following ...

    monitordata.php
    Code:
    ...
    
    $MonitorData .= "<tr><th class='monitor'>". $langHigh . "</th>" .
    ...
                        "<th class='monitor'>". $langVehicle . "</th>" .
                        "<th class='monitor'>". $langVehicleImage . "</th>" .
    
    ...
    
    // -- format vehicle image
    $vehicleImage = "./img/DefaultVehicle.png"
    switch($rowSlots["Vehicle"]){
       case "InGame-Vehicle-Name01": $vehicleImage = "./img/VehicleImage01.png"; break;
       case "InGame-Vehicle-Name02": $vehicleImage = "./img/VehicleImage02.png"; break;
       ...
    }
    
    ...
    
    $MonitorData .= "<tr class=".$trClass."><td class='center'><input type='checkbox' name='SlotID" . $rowSlots["SlotID"] . "'value='1' " . $slotSelected . " onClick='display()'></td>" .
                                           "<td class='center'>" . $vehicleClass . "</td>" .
                                           "<td class='center'>" . $vehicleImage . "</td>" .
    
    ...
    
    Quick an dirty exemplary for the monitor without any warranty.

    Cheers
    Frank
     
  17. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    Thank's Franck
     
  18. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    Not work's

    ( ! ) Parse error: syntax error, unexpected T_SWITCH in C:\wamp\www\vmliveview01\monitordata.php on line 356

    Code:
     // -- format vehicle classes
                         $vehicleClass = $rowSlots["VehicleClass"];
                         switch($vehicleClass){
                            case $class1RealName:
                               $vehicleClass = "<span style='color:" . $class1Color . ";'>" . $class1DisplayName . "</span>";
                               $classPos = "<span style='color:" . $class1Color . ";'>" . $cpClass1 . "</span>";
                               $classImg = $class1ProgressImg;
                               $cpClass1 ++;
                               break;
                            
                            case $class2RealName:
                               $vehicleClass = "<span style='color:" . $class2Color . ";'>" . $class2DisplayName . "</span>";
                               $classPos = "<span style='color:" . $class2Color . ";'>" . $cpClass2 . "</span>";
                               $classImg = $class2ProgressImg;
                               $cpClass2 ++;
                               break;
                               
                            case $class3RealName:
                               $vehicleClass = "<span style='color:" . $class3Color . ";'>" . $class3DisplayName . "</span>";
                               $classPos = "<span style='color:" . $class3Color . ";'>" . $cpClass3 . "</span>";
                               $classImg = $class3ProgressImg;
                               $cpClass3 ++;
                               break;
                            
                            case $class4RealName:
                               $vehicleClass = "<span style='color:" . $class4Color . ";'>" . $class4DisplayName . "</span>";
                               $classPos = "<span style='color:" . $class4Color . ";'>" . $cpClass4 . "</span>";
                               $classImg = $class4ProgressImg;
                               $cpClass4 ++;
                               break;
                               
                            default:
                               $vehicleClass = "<span class='classUC'>" . $rowSlots["VehicleClass"] . "</span>";
                               $classPos = "<span class='classUC'>" . $i . "</span>";
                               $classImg = "./img/CarUC.png";
                               break;
                         }
    					 
    					 
                         // -- format vehicle image
    $vehicleImage = "./img/CarP1.png"
    switch($rowSlots["Vehicle"]){
       case "#314 - Scuderia Test" $vehicleImage = "./img/CarP1.png"; break;
       case "#408 - SimRace Vereninging Nederland GT2" $vehicleImage = "./img/CarP1.png"; break;
     
    }
        
                         // -- format session laps
                         $sessionLaps = $rowSlots["Laps"];
                         if($siSessionID == 7 || $siSessionID == 10 || $siSessionID == 11 || $siSessionID == 12 || $siSessionID == 13){
                            $sessionLaps = "<a href='" . $siteURL . "/laps.php?SlotID=" . $rowSlots["SlotID"] . "&amp;Lang=" . $queryLang . "' target='_blank'>" . $rowSlots["Laps"] . "</a>";
                         }else{
                            $sessionLaps = "<a href='" . $siteURL . "/laps.php?DriverName=" . urlencode($rowSlots["DriverName"]) . "&amp;Lang=" . $queryLang . "' target='_blank'>" . $rowSlots["Laps"] . "</a>";
                         }
     
  19. Hepmi

    Hepmi Registered

    Joined:
    Dec 13, 2011
    Messages:
    31
    Likes Received:
    0
    detailed instructions to anyone?
     
  20. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    @Val: You forgot the ":" behind case "#314 - Scuderia Test"

    E.g.: case "#314 - Scuderia Test": ...

    @Hepmi: You'd like to offer or u need them?

    Cheers
    Frank
     

Share This Page