@@ -229,7 +229,6 @@ static void debounce(void *arg, long period)
229229static int export_group (int num , debounce_group_t * addr , int group_size )
230230{
231231 int n , retval , msg ;
232- char buf [HAL_NAME_LEN + 1 ];
233232
234233 /* This function exports a lot of stuff, which results in a lot of
235234 logging if msg_level is at INFO or ALL. So we save the current value
@@ -246,19 +245,17 @@ static int export_group(int num, debounce_group_t * addr, int group_size)
246245 return -1 ;
247246 }
248247 /* export param variable for delay */
249- rtapi_snprintf (buf , sizeof (buf ), "debounce.%d.delay" , num );
250- retval = hal_param_s32_new (buf , HAL_RW , & (addr -> delay ), comp_id );
248+ retval = hal_param_s32_newf (HAL_RW , & (addr -> delay ), comp_id , "debounce.%d.delay" , num );
251249 if (retval != 0 ) {
252250 rtapi_print_msg (RTAPI_MSG_ERR ,
253- "DEBOUNCE: ERROR: '%s ' param export failed\n" , buf );
251+ "DEBOUNCE: ERROR: 'debounce.%d.delay ' param export failed\n" , num );
254252 return retval ;
255253 }
256254 /* export function */
257- rtapi_snprintf (buf , sizeof (buf ), "debounce.%d" , num );
258- retval = hal_export_funct (buf , debounce , addr , 0 , 0 , comp_id );
255+ retval = hal_export_functf (debounce , addr , 0 , 0 , comp_id , "debounce.%d" , num );
259256 if (retval != 0 ) {
260257 rtapi_print_msg (RTAPI_MSG_ERR ,
261- "DEBOUNCE: ERROR: '%s ' funct export failed\n" , buf );
258+ "DEBOUNCE: ERROR: 'debounce.%d ' funct export failed\n" , num );
262259 return -1 ;
263260 }
264261 /* set default parameter values */
0 commit comments