package com.zuehlke.carrera.javapilot.services;

import ch.trq.carrera.javapilot.akka.trackanalyzer.Track;
import ch.trq.carrera.javapilot.akka.trackanalyzer.TrackSection;
import com.zuehlke.carrera.relayapi.messages.SensorEvent;
import visualization.DataChart;

/**
 * Created by mario on 08.10.15.
 */
public class PilotToVisualConnector implements PilotToVisualConnection{

    private DataChart dataChart;

    public PilotToVisualConnector(DataChart dataChart){
        this.dataChart = dataChart;
    }

    @Override
    public void send(SensorEvent message) {
        dataChart.insertSensorData(message);
    }

    @Override
    public void initializeTrack(Track track) {
        dataChart.initDataTable(track);
    }

    @Override
    public void sectionUpdate(int index, TrackSection section) {
        //TODO
    }

    @Override
    public void carUpdate(int trackSectionIndex, int offset) {
        //TODO
    }

}

@@ -800,38 +800,62 @@
 tion) %7B%0A        
-//TODO
+sectionUpdate(index, section);
 %0A    %7D%0A%0A    @Ove
@@ -935,14 +935,45 @@
     
-//TODO
+carUpdate(trackSectionIndex, offset);
 %0A   

Update Interface