'imu_period'=>'auto',// 0xFFFFFFFF, // 0 - off, >=0xff000000 - "when ready", else - number of SCLK periods
'sclk_freq'=>5000000,// $clkr_divr= 8, // 80MHz divisor to get half SCLK rate (defaulkt SCLK=5MHz)
functioninit_default_config(){
$default_config=array(
'imu_period'=>'auto',// 0xFFFFFFFF, // 0 - off, >=0xff000000 - "when ready", else - number of SCLK periods
'sclk_freq'=>5000000,// $clkr_divr= 8, // 80MHz divisor to get half SCLK rate (defaulkt SCLK=5MHz)
'stall'=>2,// SPI stall time in usec
'baud_rate'=>19200,// $rs232_div=80/2/$baud
'imu_slot'=>1,
'gps_slot'=>2,
'gps_mode'=>2,// 0 - pps pos, 1 - pps neg, 2 - start of first sesntence after pause, 3 start of sentence
'msg_conf'=>10,// GPIO bit number for external (odometer) input (+16 - invert polarity). Timestamp uses leading edge, software may write to 56-byte buffer before the trailing edge
'extra_conf'=>4,// 0 - config_long_sda_en, 1 -config_late_clk, 2 - config_single_wire, should be set for 103695 rev "A"
'slow_spi'=>0,// set to 1 for slow SPI devices (0 for ADIS-16375)
'imu_sa'=>3,// i2c slave address modifier for the 103695A pca9500
'sleep_busy'=>30000,//microseconds
'imu_registers'=>array(/// Up to 28 total
'baud_rate'=>19200,// $rs232_div=80/2/$baud
'imu_slot'=>1,
'gps_slot'=>2,
'gps_mode'=>2,// 0 - pps pos, 1 - pps neg, 2 - start of first sesntence after pause, 3 start of sentence
'msg_conf'=>10,// GPIO bit number for external (odometer) input (+16 - invert polarity). Timestamp uses leading edge, software may write to 56-byte buffer before the trailing edge
'extra_conf'=>4,// 0 - config_long_sda_en, 1 -config_late_clk, 2 - config_single_wire, should be set for 103695 rev "A"
'slow_spi'=>0,// set to 1 for slow SPI devices (0 for ADIS-16375)
'imu_sa'=>3,// i2c slave address modifier for the 103695A pca9500
'sleep_busy'=>30000,// microseconds
'imu_registers'=>array(// / Up to 28 total
0x10,// x gyro low
0x12,// x gyro high
0x14,// y gyro low
...
...
@@ -419,176 +467,208 @@ function init_default_config(){
0x0e,// temperature
0x70,// time m/s
0x72,// time d/h
0x74// time y/m
0x74
)// time y/m
,
'nmea'=>array(
// / first three letters - sentence to log (letters after "$GP"). next "n"/"b" (up to 24 total) - "n" number (will be encoded 4 digits/byte, follwed by "0xF"
// / "b" - byte - all but last will have MSB 0 (& 0x7f), the last one - with MSB set (| 0x80). If there are no characters in the field 0xff will be output
array(
'RMC',
'nbnbnbnnnnb'
),
'nmea'=>array(
/// first three letters - sentence to log (letters after "$GP"). next "n"/"b" (up to 24 total) - "n" number (will be encoded 4 digits/byte, follwed by "0xF"
/// "b" - byte - all but last will have MSB 0 (& 0x7f), the last one - with MSB set (| 0x80). If there are no characters in the field 0xff will be output
array('RMC','nbnbnbnnnnb'),
array('GGA','nnbnbnnnnbnbbb'),
array('GSA','bnnnnnnnnnnnnnnnn'),
array('VTG','nbnbnbnb')
array(
'GGA',
'nnbnbnnnnbnbbb'
),
'message'=>'Odometer message'// Message - up to 56 bytes
);
array(
'GSA',
'bnnnnnnnnnnnnnnnn'
),
array(
'VTG',
'nbnbnbnb'
)
),
'message'=>'Odometer message'
)// Message - up to 56 bytes
;
return$default_config;
}
/**
Combines $conf and $dflt arrays - all driver parameters are overwritten aftre the call