@@ -58,7 +58,9 @@ void print_usage(int argc, const char * argv[])
5858 " Version: %s \n "
5959 " Usage:\n "
6060 " For serial channel %s --channel --serial <com port> [baudrate]\n "
61- " The baudrate is 115200(for A2) , 256000(for A3 and S1), 1000000(for S2).\n "
61+ " The baudrate used by different models is as follows:\n "
62+ " A1(115200),A2M7(256000),A2M8(115200),A2M12(256000),"
63+ " A3(256000),S1(256000),S2(1000000),S3(1000000)\n "
6264 " For udp channel %s --channel --udp <ipaddr> [port NO.]\n "
6365 " The LPX default ipaddr is 192.168.11.2,and the port NO.is 8089. Please refer to the datasheet for details.\n "
6466 , " SL_LIDAR_SDK_VERSION" , argv[0 ], argv[0 ]);
@@ -69,7 +71,7 @@ void plot_histogram(sl_lidar_response_measurement_node_hq_t * nodes, size_t coun
6971{
7072 const int BARCOUNT = 75 ;
7173 const int MAXBARHEIGHT = 20 ;
72- const float ANGLESCALE = 360 .0f /BARCOUNT;
74+ // const float ANGLESCALE = 360.0f/BARCOUNT;
7375
7476 float histogram[BARCOUNT];
7577 for (int pos = 0 ; pos < _countof (histogram); ++pos) {
@@ -140,11 +142,11 @@ sl_result capture_and_display(ILidarDriver * drv)
140142}
141143
142144int main (int argc, const char * argv[]) {
143- const char * opt_channel = NULL ;
144- const char * opt_channel_param_first = NULL ;
145- sl_u32 opt_channel_param_second = 0 ;
146- sl_result op_result;
147- int opt_channel_type = CHANNEL_TYPE_SERIALPORT;
145+ const char *opt_channel = NULL ;
146+ const char *opt_channel_param_first = NULL ;
147+ sl_u32 opt_channel_param_second = 0 ;
148+ sl_result op_result;
149+ int opt_channel_type = CHANNEL_TYPE_SERIALPORT;
148150
149151 IChannel* _channel;
150152
@@ -206,7 +208,7 @@ int main(int argc, const char * argv[]) {
206208 , opt_channel_param_first);
207209 break ;
208210 case CHANNEL_TYPE_UDP:
209- fprintf (stderr, " Error, cannot connect to the ip addr %s with the udp port %s .\n "
211+ fprintf (stderr, " Error, cannot connect to the ip addr %s with the udp port %u .\n "
210212 , opt_channel_param_first, opt_channel_param_second);
211213 break ;
212214 }
0 commit comments