Capacitive Soil Sensor mapping and online editor

That would evaluate to:

soilMoistureValue = (sensorValue -350) * .4;

map() is usually formed like this:

outputValue = map ( inputValue, minInput, maxInput, minOutput, maxOutput);