File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131
3232 int main() {
3333 LibXR::PlatformInit();
34- LibXR::STDIO::Printf( "This is XRobot Module Template Test\n");
34+ LibXR::STDIO::Printf< "This is XRobot Module Template Test\n">( );
3535 LibXR::HardwareContainer hw;
3636 XRobotMain(hw);
3737 return 0;
Original file line number Diff line number Diff line change @@ -93,9 +93,8 @@ class SharedTopic : public LibXR::Application {
9393
9494 static int CommandFunc (SharedTopic* self, int argc, char ** argv) {
9595 if (argc == 1 ) {
96- LibXR::STDIO::Printf (" Usage:\r\n " );
97- LibXR::STDIO::Printf (
98- " monitor [time_ms] [interval_ms] - test received speed\r\n " );
96+ LibXR::STDIO::Printf<" Usage:\r\n " >();
97+ LibXR::STDIO::Printf<" monitor [time_ms] [interval_ms] - test received speed\r\n " >();
9998 return 0 ;
10099 } else if (argc == 4 ) {
101100 if (strcmp (argv[1 ], " monitor" ) == 0 ) {
@@ -104,15 +103,14 @@ class SharedTopic : public LibXR::Application {
104103 auto start = self->rx_count_ ;
105104 while (time > 0 ) {
106105 LibXR::Thread::Sleep (delay);
107- LibXR::STDIO::Printf (
108- " %f Mbps\r\n " , static_cast <float >(self->rx_count_ - start) * 8.0 /
106+ LibXR::STDIO::Printf<" %f Mbps\r\n " >(static_cast <float >(self->rx_count_ - start) * 8.0 /
109107 1024.0 / 1024.0 / delay * 1000.0 );
110108 time -= delay;
111109 start = self->rx_count_ ;
112110 }
113111 }
114112 } else {
115- LibXR::STDIO::Printf ( " Error: Invalid arguments.\r\n " );
113+ LibXR::STDIO::Printf< " Error: Invalid arguments.\r\n " >( );
116114 return -1 ;
117115 }
118116
You can’t perform that action at this time.
0 commit comments