Upgrade performance of genDutyTab function in main.c to fix the calculation delay problem when generate a new duty cycle table