The temp_control app you linked to is based on an older version of the SDK, 3.1.0. This will not work if your project is based on WICED Studio 4.1.1.

Please try with the attached version of factory_reset_dct.c included in the temp_control app folder and let us know if this works for you. Also, please try the original temp_control app attached here to verify that it works on your board before applying your changes.