77import { clone } from "lodash" ;
88import { BotPosition , SourceFbosConfig } from "../devices/interfaces" ;
99import {
10- ConfigurationName , TaggedCurve , TaggedGenericPointer , TaggedImage , TaggedPoint ,
10+ ConfigurationName , TaggedCurve , TaggedFarmwareEnv , TaggedGenericPointer ,
11+ TaggedImage , TaggedPoint ,
1112 TaggedPointGroup , TaggedSensor , TaggedSensorReading , TaggedWeedPointer ,
1213} from "farmbot" ;
1314import { CameraCalibrationData , DesignerState } from "./interfaces" ;
@@ -22,6 +23,7 @@ import { DeviceAccountSettings } from "farmbot/dist/resources/api_resources";
2223import { SCENES } from "../settings/three_d_settings" ;
2324import { get3DTime , latLng } from "../three_d_garden/time_travel" ;
2425import { parseCalibrationData } from "./map/layers/images/map_image" ;
26+ import { fetchInterpolationOptions } from "./map/layers/points/interpolation_map" ;
2527
2628export interface ThreeDGardenMapProps {
2729 botSize : BotSize ;
@@ -48,6 +50,7 @@ export interface ThreeDGardenMapProps {
4850 sensorReadings : TaggedSensorReading [ ] ;
4951 sensors : TaggedSensor [ ] ;
5052 cameraCalibrationData : CameraCalibrationData ;
53+ farmwareEnvs : TaggedFarmwareEnv [ ] ;
5154}
5255
5356export const ThreeDGardenMap = ( props : ThreeDGardenMapProps ) => {
@@ -162,6 +165,11 @@ export const ThreeDGardenMap = (props: ThreeDGardenMapProps) => {
162165 config . imgCenterX = camCalData . centerX ;
163166 config . imgCenterY = camCalData . centerY ;
164167
168+ const options = fetchInterpolationOptions ( props . farmwareEnvs ) ;
169+ config . interpolationStepSize = options . stepSize ;
170+ config . interpolationUseNearest = options . useNearest ;
171+ config . interpolationPower = options . power ;
172+
165173 config . zoom = true ;
166174 config . pan = true ;
167175 config . rotate = ! props . designer . threeDTopDownView ;
0 commit comments