Never mind, I found the deprecation statement in peripherals.h, code should be:
hServo.servo1.setWidth(1500):