Skip to content

Commit

Permalink
Removes some of the old "ToDo" and "TEMP" comments
Browse files Browse the repository at this point in the history
  • Loading branch information
BjAlvestad committed Jun 6, 2019
1 parent ed9c7d6 commit 69370a7
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ private async void Lidar_PropertyChanged(object sender, System.ComponentModel.Pr
if (AutoCalculateLargestDistance)
{
HorizontalPoint point = Lidar.LargestDistance;
//TODO: check if running this on UI-thread causes freezing (on weaker hardware). If it does: wrap in Task.Run. If it doesn't, then check AutoCalcDirections, and HorizontalPoints, if they also run ok on UI thread.
}

if (CalculateHorizontalPoints)
Expand Down
1 change: 0 additions & 1 deletion SensorVehicle-main/Application/Views/LidarPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@

<TextBlock Text="MinRange:" />
<ComboBox SelectedItem="{x:Bind ViewModel.Lidar.Config.MinRange, Mode=TwoWay}" >
<!--TODO: Make combobox editable and robust. Fix issue where 0.7 gets displayed as long number (0.69.....) when combobox is editable -->
<!--Official minimum range is 1.0m (Ref. manual). See https://github.com/ros-drivers/velodyne/issues/61 for a discussion on alternative minimum ranges for VLP-16.-->
<x:Double>0.1</x:Double>
<x:Double>0.3</x:Double>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Communication.Simulator
{
public class SimulatedLidarPacketReceiver : ILidarPacketReceiver
{
private const int TimePerCycle = 200; //TODO: Check exact time spent per cycle for real PacketReceiver, and correct TimePerCycle constant.
private const int TimePerCycle = 200;
private SimulatorAppServiceClient _simulatorCommunication;
private LidarFormatPacketGenerator _packetGenerator;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ public async Task<Queue<byte[]>> GetQueueOfDataPacketsAsync(byte numberOfCycles

public byte[] GetDataPacket()
{
byte[] dataPacket = Udp.Receive(ref _lidarIpEp); //TODO: Change to async
byte[] dataPacket = Udp.Receive(ref _lidarIpEp);

return (dataPacket.Length == DataPayloadSize) ? dataPacket : null;
}

public async Task<byte[]> GetDataPacketAsync()
{
var receiveResult = await Udp.ReceiveAsync(); //TODO: Change to async
var receiveResult = await Udp.ReceiveAsync();

return (receiveResult.Buffer.Length == DataPayloadSize) ? receiveResult.Buffer : null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public override void Run(CancellationToken cancellationToken)

float angleToLargestDistance = _lidar.LargestDistance.Angle;

if (float.IsNaN(angleToLargestDistance)) //TODO: Make LIDAR class throw exception when calling methods (or when accessing Distance) when power is off, or collector not running.
if (float.IsNaN(angleToLargestDistance))
{
_wheels.Stop();
Debug.WriteLine("STOPPED WHEELS due to no LIDAR distance found!", "ControlLogic");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ public List<HorizontalPoint> GetHorizontalPointsInRange(float fromAngle, float t

int startIndex = Distances[verticalAngle].FindIndex(point => point.Angle > fromAngle);

//TEMP: New logic (and list is first sorted in LidarPacketInterpreter). Check which is fastest. Old or this.
if (angleSpansZero)
{
if (startIndex != -1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class LidarDistanceConfiguration : ThreadSafeNotifyPropertyChanged
public LidarDistanceConfiguration(VerticalAngle[] verticalAngles)
{
DefaultHalfBeamOpening = 15;
DefaultCalculationType = CalculationType.Max; //TEMP
DefaultCalculationType = CalculationType.Max;

ActiveVerticalAngles = new ExclusiveSynchronizedObservableCollection<VerticalAngle>();
DefaultVerticalAngle = verticalAngles[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static ReadOnlyDictionary<VerticalAngle, List<HorizontalPoint>> Interpret
}
}

SortLidarDistances(interpretedData); //TODO: Check if list should be sortet before sending out, or iterated for each check in LidarDistance class
SortLidarDistances(interpretedData);

return new ReadOnlyDictionary<VerticalAngle, List<HorizontalPoint>>(interpretedData);
}
Expand Down

0 comments on commit 69370a7

Please sign in to comment.