Skip to content

Commit 6fca46b

Browse files
authored
Fix single line comment style (#224)
1 parent 89828c9 commit 6fca46b

28 files changed

+390
-398
lines changed

include/ypspur-md.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,53 +121,53 @@ typedef struct
121121
int connection_error;
122122
} YPSpur;
123123

124-
/** init */
124+
// init
125125
int YPSpur_md_init(YPSpur* dev);
126126
int YPSpur_md_initex(YPSpur* dev, int msq_key);
127127
int YPSpur_md_init_socket(YPSpur* dev, char* ip, int port);
128128

129-
/** freeze */
129+
// freeze
130130
int YPSpur_md_isfreeze(YPSpur* dev);
131131
int YPSpur_md_freeze(YPSpur* dev);
132132
int YPSpur_md_unfreeze(YPSpur* dev);
133133

134-
/** motor servo */
134+
// motor servo
135135
int YPSpur_md_stop(YPSpur* dev);
136136
int YPSpur_md_free(YPSpur* dev);
137137
int YP_md_openfree(YPSpur* dev);
138138

139-
/** Spur_md */
139+
// Spur_md
140140
int YPSpur_md_line(YPSpur* dev, int cs, double x, double y, double theta);
141141
int YPSpur_md_stop_line(YPSpur* dev, int cs, double x, double y, double theta);
142142
int YPSpur_md_circle(YPSpur* dev, int cs, double x, double y, double r);
143143
int YPSpur_md_spin(YPSpur* dev, int cs, double theta);
144144
int YPSpur_md_orient(YPSpur* dev, int cs, double theta);
145145

146-
/** setter */
146+
// setter
147147
int YPSpur_md_set_pos(YPSpur* dev, int cs, double x, double y, double theta);
148148
int YPSpur_md_adjust_pos(YPSpur* dev, int cs, double x, double y, double theta);
149149
int YPSpur_md_set_vel(YPSpur* dev, double v);
150150
int YPSpur_md_set_angvel(YPSpur* dev, double w);
151151
int YPSpur_md_set_accel(YPSpur* dev, double v);
152152
int YPSpur_md_set_angaccel(YPSpur* dev, double w);
153153

154-
/** getter */
154+
// getter
155155
double YPSpur_md_get_pos(YPSpur* dev, int cs, double* x, double* y, double* theta);
156156
double YPSpur_md_get_vel(YPSpur* dev, double* v, double* w);
157157
double YPSpur_md_get_force(YPSpur* dev, double* trans, double* angular);
158158

159-
/** check position */
159+
// check position
160160
int YPSpur_md_near_pos(YPSpur* dev, int cs, double x, double y, double r);
161161
int YPSpur_md_near_ang(YPSpur* dev, int cs, double th, double d);
162162
int YPSpur_md_over_line(YPSpur* dev, int cs, double x, double y, double theta);
163163

164-
/** direct */
164+
// direct
165165
int YPSpur_md_vel(YPSpur* dev, double v, double w);
166166

167-
/** tilt */
167+
// tilt
168168
int YPSpur_md_tilt(YPSpur* dev, int cs, double dir, double tilt);
169169

170-
/* 裏コマンド集 */
170+
// 裏コマンド集
171171
int YP_md_get_error_state(YPSpur* dev);
172172
void YP_md_request_device_dump(YPSpur* dev, int id, int block);
173173

include/ypspur.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extern "C"
2828
{
2929
#endif // __cplusplus
3030

31-
/* YPSpurコマンド集 */
31+
// YPSpurコマンド集
3232
#define Spur_init() YPSpur_init()
3333
#define Spur_initex(msq) YPSpur_initex(msq)
3434
#define Spur_init_socket(ip, port) YPSpur_init_socket(ip, port)
@@ -115,53 +115,53 @@ extern "C"
115115
#define Spur_tilt_BS(d, t) YPSpur_tilt(CS_BS, d, t)
116116
#define Spur_tilt_BL(d, t) YPSpur_tilt(CS_BL, d, t)
117117

118-
/** init */
118+
// init
119119
int YPSpur_init(void);
120120
int YPSpur_initex(int msq_key);
121121
int YPSpur_init_socket(char* ip, int port);
122122

123-
/** freeze */
123+
// freeze
124124
int YPSpur_isfreeze(void);
125125
int YPSpur_freeze(void);
126126
int YPSpur_unfreeze(void);
127127

128-
/** motor servo */
128+
// motor servo
129129
int YPSpur_stop(void);
130130
int YPSpur_free(void);
131131
int YP_openfree(void);
132132

133-
/** spur */
133+
// spur
134134
int YPSpur_line(int cs, double x, double y, double theta);
135135
int YPSpur_stop_line(int cs, double x, double y, double theta);
136136
int YPSpur_circle(int cs, double x, double y, double r);
137137
int YPSpur_spin(int cs, double theta);
138138
int YPSpur_orient(int cs, double theta);
139139

140-
/** setter */
140+
// setter
141141
int YPSpur_set_pos(int cs, double x, double y, double theta);
142142
int YPSpur_adjust_pos(int cs, double x, double y, double theta);
143143
int YPSpur_set_vel(double v);
144144
int YPSpur_set_angvel(double w);
145145
int YPSpur_set_accel(double v);
146146
int YPSpur_set_angaccel(double w);
147147

148-
/** getter */
148+
// getter
149149
double YPSpur_get_pos(int cs, double* x, double* y, double* theta);
150150
double YPSpur_get_vel(double* v, double* w);
151151
double YPSpur_get_force(double* trans, double* angular);
152152

153-
/** check position */
153+
// check position
154154
int YPSpur_near_pos(int cs, double x, double y, double r);
155155
int YPSpur_near_ang(int cs, double th, double d);
156156
int YPSpur_over_line(int cs, double x, double y, double theta);
157157

158-
/** direct */
158+
// direct
159159
int YPSpur_vel(double v, double w);
160160

161-
/** tilt */
161+
// tilt
162162
int YPSpur_tilt(int cs, double dir, double tilt);
163163

164-
/* 裏コマンド集 */
164+
// 裏コマンド集
165165
int YP_get_error_state(void);
166166
void YP_request_device_dump(int id, int block);
167167

include/ypspur/command.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ void message_return(struct ipcmd_t* ipcmd, long retpid, YPSpur_msg* res_msg);
9797
void init_command_thread(pthread_t* thread);
9898
SpurUserParamsPtr get_spur_user_param_ptr();
9999

100-
/* command_run.c */
100+
// command_run.c
101101
void line_com(int cs, double* data, SpurUserParamsPtr spur);
102102
void stop_line_com(int cs, double* data, SpurUserParamsPtr spur);
103103
void circle_com(int cs, double* data, SpurUserParamsPtr spur);
@@ -110,7 +110,7 @@ void vel_com(double* data, SpurUserParamsPtr spur);
110110
void wheel_vel_com(double* data, SpurUserParamsPtr spur);
111111
void wheel_angle_com(double* data, SpurUserParamsPtr spur);
112112

113-
/* command_set.c */
113+
// command_set.c
114114
void set_pos_com(int cs, double* data, SpurUserParamsPtr spur);
115115
void set_GL_on_GL_com(double* data, SpurUserParamsPtr spur);
116116
void set_adjust_com(int cs, double* data, SpurUserParamsPtr spur);
@@ -123,7 +123,7 @@ void set_torque_com(double* data, SpurUserParamsPtr spur);
123123
void set_wheel_vel_com(double* data, SpurUserParamsPtr spur);
124124
void set_wheel_accel_com(double* data, SpurUserParamsPtr spur);
125125

126-
/* command_get.c */
126+
// command_get.c
127127
void get_pos_com(int cs, double* data, double* resdata, SpurUserParamsPtr spur);
128128
void get_vel_com(int cs, double* data, double* resdata, SpurUserParamsPtr spur);
129129
void get_vref_com(int cs, double* data, double* resdata, SpurUserParamsPtr spur);
@@ -136,12 +136,12 @@ void get_wheel_ang_com(double* data, double* resdata, SpurUserParamsPtr spur);
136136
void get_force_com(int cs, double* data, double* resdata, SpurUserParamsPtr spur);
137137
void get_wheel_torque_com(int cs, double* data, double* resdata, SpurUserParamsPtr spur);
138138

139-
/* command_param.c */
139+
// command_param.c
140140
void param_set_com(int cs, double* data, SpurUserParamsPtr spur);
141141
int param_get_com(int cs, double* resdata, SpurUserParamsPtr spur);
142142
void param_state_com(int cs, double* data, SpurUserParamsPtr spur);
143143

144-
/* command_ad.c */
144+
// command_ad.c
145145
void get_ad_com(double* data, double* resdata);
146146
void set_io_dir_com(double* data, double* resdata);
147147
void set_io_data_com(double* data, double* resdata);

include/ypspur/msq.win32.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,32 +65,32 @@ typedef unsigned long int msglen_t;
6565

6666
struct ipc_perm
6767
{
68-
key_t __key; /* Key. */
69-
uid_t uid; /* Owner's user ID. */
70-
gid_t gid; /* Owner's group ID. */
71-
uid_t cuid; /* Creator's user ID. */
72-
gid_t cgid; /* Creator's group ID. */
73-
unsigned short int mode; /* Read/write permission. */
68+
key_t __key; // Key.
69+
uid_t uid; // Owner's user ID.
70+
gid_t gid; // Owner's group ID.
71+
uid_t cuid; // Creator's user ID.
72+
gid_t cgid; // Creator's group ID.
73+
unsigned short int mode; // Read/write permission.
7474
unsigned short int __pad1;
75-
unsigned short int __seq; /* Sequence number. */
75+
unsigned short int __seq; // Sequence number.
7676
unsigned short int __pad2;
7777
unsigned long int __unused1;
7878
unsigned long int __unused2;
7979
};
8080
struct msqid_ds
8181
{
82-
struct ipc_perm msg_perm; /* structure describing operation permission */
83-
time_t msg_stime; /* time of last msgsnd command */
82+
struct ipc_perm msg_perm; // structure describing operation permission
83+
time_t msg_stime; // time of last msgsnd command
8484
unsigned long int __unused1;
85-
time_t msg_rtime; /* time of last msgrcv command */
85+
time_t msg_rtime; // time of last msgrcv command
8686
unsigned long int __unused2;
87-
time_t msg_ctime; /* time of last change */
87+
time_t msg_ctime; // time of last change
8888
unsigned long int __unused3;
89-
unsigned long int __msg_cbytes; /* current number of bytes on queue */
90-
msgqnum_t msg_qnum; /* number of messages currently on queue */
91-
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
92-
pid_t msg_lspid; /* pid of last msgsnd() */
93-
pid_t msg_lrpid; /* pid of last msgrcv() */
89+
unsigned long int __msg_cbytes; // current number of bytes on queue
90+
msgqnum_t msg_qnum; // number of messages currently on queue
91+
msglen_t msg_qbytes; // max number of bytes allowed on queue
92+
pid_t msg_lspid; // pid of last msgsnd()
93+
pid_t msg_lrpid; // pid of last msgrcv()
9494
unsigned long int __unused4;
9595
unsigned long int __unused5;
9696
};

include/ypspur/serial.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#define DEFAULT_BAUDRATE 38400
2828

29-
/* for measurement time estimation */
29+
// for measurement time estimation
3030
extern double SER_BAUDRATE; /// (Byte/sec) シリアルの通信速度
3131
#define SER_INTERVAL 0.0050
3232
// #define SER_BYTES 13.0
@@ -36,7 +36,6 @@ int serial_tryconnect(char* device_name);
3636
int serial_connect(char* device_name);
3737
int serial_change_baudrate(int baud);
3838

39-
/*----------------PBS_close------------------*/
4039
int serial_close(void);
4140
int serial_write(char* buf, int len);
4241
int serial_recieve(int (*serial_event)(char*, int, double, void*), void* data);

include/ypspur/ypparam.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ typedef int pid_t;
4242

4343
#endif // defined(_WIN32)
4444

45-
/* コマンドナンバー */
45+
// コマンドナンバー
4646
enum
4747
{
4848
YPSPUR_FREE = 0x10,
@@ -113,9 +113,8 @@ enum
113113
YPSPUR_GET_JOINT_TORQUE,
114114
};
115115

116-
/* パラメータナンバー */
117-
/* set_parameter用 */
118-
/* マイコンに送る情報は反映されない */
116+
// パラメータナンバー
117+
// set_parameter用でマイコンに送る値とは異なる
119118
typedef enum
120119
{
121120
// システム
@@ -221,7 +220,7 @@ typedef enum
221220
YP_PARAM_MAX_TIME_JUMP,
222221
YP_PARAM_MAX_TIME_JUMP_NEG,
223222

224-
YP_PARAM_NUM ///< パラメータの最大値
223+
YP_PARAM_NUM /// パラメータの最大値
225224
} YPSpur_param;
226225

227226
// 自分で指定しない(できない)パラメータは最初の文字が'_'で始まっている
@@ -480,8 +479,6 @@ enum motor_id
480479
#define YP_PARAM_REQUIRED_VERSION 4.0
481480
#define YP_PARAM_SUPPORTED_VERSION 5.0
482481

483-
/* パラメータの有効・無効 */
484-
/* control_state用   */
485482
typedef enum
486483
{
487484
YP_STATE_MOTOR = 0,
@@ -493,7 +490,6 @@ typedef enum
493490
YP_STATE_NUM
494491
} YPSpur_state;
495492

496-
/** メッセージ関連 */
497493
typedef enum
498494
{
499495
CS_BS = 0,

include/ypspur/ypprotocol.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extern "C"
2929
{
3030
#endif // __cplusplus
3131

32-
/** Structure of VV command */
32+
/// Structure of VV command
3333
typedef struct VERSION_INFO
3434
{
3535
char vender[128];
@@ -39,7 +39,7 @@ typedef struct VERSION_INFO
3939
char serialno[128];
4040
} Ver_t;
4141

42-
/** Structure of PP command */
42+
/// Structure of PP command
4343
typedef struct PARAMETER_INFO
4444
{
4545
char pwm_resolution[128];

src/adinput.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
#include <sys/types.h>
3131
#include <time.h>
3232

33-
/* yp-spur用 */
33+
// yp-spur用
3434
#include <ypspur/odometry.h>
3535
#include <ypspur/serial.h>
3636
#include <ypspur/utility.h>
3737

38-
/* ライブラリ用 */
38+
// ライブラリ用
3939
#include <ypspur.h>
4040

4141
int ad[16]; // ad値保存用バッファ
@@ -60,7 +60,7 @@ int process_addata(unsigned char* buf, int len)
6060
return ad_num;
6161
}
6262

63-
/* read ad data func for ssm write */
63+
// read ad data func for ssm write
6464
const int* get_addataptr()
6565
{
6666
return ad;
@@ -98,7 +98,7 @@ int admask_receive(char* buf, int len, double receive_time, void* data)
9898

9999
int set_admask(unsigned char mask)
100100
{
101-
/* Send & Recive Buffer */
101+
// Send & Recive Buffer
102102
char buf[2048];
103103
int i;
104104

@@ -132,7 +132,7 @@ int set_admask(unsigned char mask)
132132

133133
int set_diomask(unsigned char enable)
134134
{
135-
/* Send & Recive Buffer */
135+
// Send & Recive Buffer
136136
char buf[2048];
137137
dio_num = 0;
138138

0 commit comments

Comments
 (0)