OSDN Git Service

Remove all samples. They will work well and useful for reference. But there is no...
[nxt-jsp/etrobo-atk.git] / nxtOSEK / ecrobot / nxtway_gs_balancer / balancer.h
1 /**\r
2  ******************************************************************************\r
3  **     \83t\83@\83C\83\8b\96¼ : balancer.h\r
4  **\r
5  ** \83\82\83f\83\8b\8aÖ\98A\8fî\95ñ:\r
6  **   \83\82\83f\83\8b\96¼   : balancer.mdl\r
7  **   \83o\81[\83W\83\87\83\93 : 1.893\r
8  **   \97\9a\97ð       : y_yama - Tue Sep 25 11:37:09 2007\r
9  **                takashic - Sun Sep 28 17:50:53 2008\r
10  **\r
11  ** Copyright (c) 2008 CYBERNET SYSTEMS CO.,LTD.\r
12  ** All rights reserved.\r
13  ******************************************************************************\r
14  **/\r
15 \r
16 #ifndef RTW_HEADER_balancer_h_\r
17 #define RTW_HEADER_balancer_h_\r
18 #ifndef balancer_COMMON_INCLUDES_\r
19 # define balancer_COMMON_INCLUDES_\r
20 #include "rtwtypes.h"\r
21 #include "rt_SATURATE.h"\r
22 #endif                                 /* balancer_COMMON_INCLUDES_ */\r
23 \r
24 #include "balancer_types.h"\r
25 \r
26 /* Macros for accessing real-time model data structure */\r
27 #ifndef rtmGetErrorStatus\r
28 # define rtmGetErrorStatus(rtm)        ((void*) 0)\r
29 #endif\r
30 \r
31 #ifndef rtmSetErrorStatus\r
32 # define rtmSetErrorStatus(rtm, val)   ((void) 0)\r
33 #endif\r
34 \r
35 #ifndef rtmGetStopRequested\r
36 # define rtmGetStopRequested(rtm)      ((void*) 0)\r
37 #endif\r
38 \r
39 #define CMD_MAX                        100.0F                    /* \91O\90i/\90ù\89ñ\96½\97ß\90â\91Î\8dÅ\91å\92l */\r
40 #define DEG2RAD                        0.01745329238F            /* \8ap\93x\92P\88Ê\95Ï\8a·\8cW\90\94(=pi/180) */\r
41 #define EXEC_PERIOD                    0.00400000019F            /* \83o\83\89\83\93\83X\90§\8cä\8eÀ\8ds\8eü\8aú(\95b) */\r
42 \r
43 /* Model entry point functions */\r
44 extern void balance_init(void);\r
45 \r
46 /* Customized model step function */\r
47 extern void balance_control(F32 args_cmd_forward, F32 args_cmd_turn,\r
48   F32 args_gyro, F32 args_gyro_offset, F32 args_theta_m_l,\r
49   F32 args_theta_m_r, F32 args_battery, S8 *ret_pwm_l, S8\r
50   *ret_pwm_r);\r
51 \r
52 /*-\r
53  * The generated code includes comments that allow you to trace directly\r
54  * back to the appropriate location in the model.  The basic format\r
55  * is <system>/block_name, where system is the system number (uniquely\r
56  * assigned by Simulink) and block_name is the name of the block.\r
57  *\r
58  * Use the MATLAB hilite_system command to trace the generated code back\r
59  * to the model.  For example,\r
60  *\r
61  * hilite_system('<S3>')    - opens system 3\r
62  * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3\r
63  *\r
64  * Here is the system hierarchy for this model\r
65  *\r
66  * '<Root>' : balancer\r
67  * '<S1>'   : balancer/Control\r
68  * '<S2>'   : balancer/Control/Cal_PWM\r
69  * '<S3>'   : balancer/Control/Cal_Reference\r
70  * '<S4>'   : balancer/Control/Cal_x1\r
71  * '<S5>'   : balancer/Control/DiscreteIntegrator\r
72  * '<S6>'   : balancer/Control/Cal_PWM/Cal_vol_max\r
73  * '<S7>'   : balancer/Control/Cal_Reference/DiscreteIntegrator\r
74  * '<S8>'   : balancer/Control/Cal_Reference/LowPathFilter\r
75  * '<S9>'   : balancer/Control/Cal_x1/DiscreteDerivative\r
76  * '<S10>'  : balancer/Control/Cal_x1/DiscreteIntegrator\r
77  * '<S11>'  : balancer/Control/Cal_x1/LowPathFilter\r
78  */\r
79 #endif                                 /* RTW_HEADER_balancer_h_ */\r
80 \r
81 /*======================== TOOL VERSION INFORMATION ==========================*\r
82  * MATLAB 7.7 (R2008b)30-Jun-2008                                             *\r
83  * Simulink 7.2 (R2008b)30-Jun-2008                                           *\r
84  * Real-Time Workshop 7.2 (R2008b)30-Jun-2008                                 *\r
85  * Real-Time Workshop Embedded Coder 5.2 (R2008b)30-Jun-2008                  *\r
86  * Stateflow 7.2 (R2008b)30-Jun-2008                                          *\r
87  * Stateflow Coder 7.2 (R2008b)30-Jun-2008                                    *\r
88  * Simulink Fixed Point 6.0 (R2008b)30-Jun-2008                               *\r
89  *============================================================================*/\r
90 \r
91 /*======================= LICENSE IN USE INFORMATION =========================*\r
92  * matlab                                                                     *\r
93  * real-time_workshop                                                         *\r
94  * rtw_embedded_coder                                                         *\r
95  * simulink                                                                   *\r
96  *============================================================================*/\r
97 /******************************** END OF FILE ********************************/\r