Beispiel #1
0
size_t get_tacho_position( uint8_t id, int *buf )
{
	char s[] = PATH_POSITION;
	*modp_uitoa10( id, s + PATH_PREF_LEN ) = '/';

	return ev3_read_int( s, buf );
}
Beispiel #2
0
size_t get_tacho_speed_regulation_P( uint8_t id, int *buf )
{
	char s[] = PATH_SPEED_REGULATION_P;
	*modp_uitoa10( id, s + PATH_PREF_LEN ) = '/';

	return ev3_read_int( s, buf );
}
Beispiel #3
0
size_t get_tacho_duty_cycle_sp( uint8_t id, int *buf )
{
	char s[] = PATH_DUTY_CYCLE_SP;
	*modp_uitoa10( id, s + PATH_PREF_LEN ) = '/';

	return ev3_read_int( s, buf );
}
size_t get_servo_min_pulse_sp( uint8_t sn, int *buf )
{
    char s[] = PATH_MIN_PULSE_SP;
    *modp_uitoa10( sn, s + PATH_PREF_LEN ) = '/';

    return ev3_read_int( s, buf );
}
Beispiel #5
0
size_t get_tacho_pulses_per_second_sp( uint8_t id, int *buf )
{
	char s[] = PATH_PULSES_PER_SECOND_SP;
	*modp_uitoa10( id, s + PATH_PREF_LEN ) = '/';

	return ev3_read_int( s, buf );
}
size_t get_servo_rate_sp( uint8_t sn, int *buf )
{
    char s[] = PATH_RATE_SP;
    *modp_uitoa10( sn, s + PATH_PREF_LEN ) = '/';

    return ev3_read_int( s, buf );
}
size_t get_servo_position_sp( uint8_t sn, int *buf )
{
    char s[] = PATH_POSITION_SP;
    *modp_uitoa10( sn, s + PATH_PREF_LEN ) = '/';

    return ev3_read_int( s, buf );
}
Beispiel #8
0
size_t ev3_read_byte( const char *fn, uint8_t *buf )
{
	int _int;
	if ( ev3_read_int( fn, &_int )) {
		*buf = ( uint8_t ) _int;

		return ( sizeof( uint8_t ));
	}
	return ( 0 );
}
Beispiel #9
0
size_t ev3_read_bool( const char *fn, bool *buf )
{
	int _int;
	if ( ev3_read_int( fn, &_int )) {
		*buf = !!_int;

		return ( sizeof( bool ));
	}
	return ( 0 );
}
Beispiel #10
0
size_t get_led_delay_off( uint8_t inx, int *buf )
{
	if ( inx >= LED__COUNT_ ) return ( 0 );

	return ev3_read_int( led_attr_delay_off[ inx ], buf );
}