啃萝卜插件上线了!-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 14039|回复: 12

啃萝卜插件上线了!

[复制链接]
发表于 2017-2-15 14:33 | 显示全部楼层 |阅读模式
本帖最后由 kenrobot 于 2017-2-19 17:30 编辑

澳门赌场.jpg
“澳门首家线上赌场上线啦……”不对不对,跑偏了。
在情人节大好的日子,啃萝卜和中文社区的程序猿们一起愉快的加着班将啃萝卜插件上线了。

那么“啃萝卜插件”是什么嘞?

当你开开心心写了段代码,想要和大家分(zhuang)享(B)的时候;
当你辛辛苦苦做了个项目,想要给大家介(zhuang)绍(B)的时候;
当你懵懵懂懂遇到了bug,想要找大佬求(P)教(Y)的时候;

那么一定用到啃萝卜插件!

[kenrobot_code]/**
* 日期: 2017/02/15
* 作者:啃萝卜
* 描述:
*/

void setup()
{
    Serail.begin(9600);
}

void loop()
{
    Serail.print("Hello world");
}
[/kenrobot_code]

漂亮的高亮和着色,让代码的阅读更加舒适,再也不用担心女神嫌弃代码看不懂了。
那么应该怎么用呐?

当你发帖时,可以点击啃萝卜插件
5)O7PGY[_OR(]6]XJPRCC)I.png
然后在编辑框里输入代码
QQ截图20170217170643.png
就ok了,就是这么简单!

啃萝卜插件可以将你的代码更好的展示出来,当然也可以作为编辑器,里面自带了代码智能提醒、自动补全功能,当然了,我们还是更希望直接使用http://ide.kenrobot.com

发表于 2017-2-18 00:43 | 显示全部楼层
连接点开是404唉
发表于 2017-2-18 10:20 | 显示全部楼层

再试试,手动编辑修改了。
发表于 2017-2-18 14:54 | 显示全部楼层
syl312 发表于 2017-2-18 10:20
再试试,手动编辑修改了。

还是不对啊    是ide.kenrobot.com  不是www.kenrobot.com
发表于 2017-2-18 15:16 | 显示全部楼层
AshesofTime 发表于 2017-2-18 14:54
还是不对啊    是ide.kenrobot.com  不是www.kenrobot.com

打开文章中的链接,已经正确了。
发表于 2017-2-19 20:22 | 显示全部楼层
PY交易都已经到这深度了?
发表于 2017-2-20 12:23 | 显示全部楼层
Or2 发表于 2017-2-19 20:22
PY交易都已经到这深度了?

居然被你发现啦~
发表于 2017-2-20 22:26 | 显示全部楼层
[kenrobot_code]
// add_motor
void AP_MotorsMatrix::add_motor_raw(int8_t motor_num, float roll_fac, float pitch_fac, float yaw_fac, uint8_t testing_order)
{
        // ensure valid motor number is provided
        if( motor_num >= 0 && motor_num < AP_MOTORS_MAX_NUM_MOTORS )
        {

                // increment number of motors if this motor is being newly motor_enabled
                if( !motor_enabled[motor_num] )
                {
                        motor_enabled[motor_num] = true;
                        _num_motors++;
                }

                // set roll, pitch, thottle factors and opposite motor (for stability patch)
                _roll_factor[motor_num] = roll_fac;
                _pitch_factor[motor_num] = pitch_fac;
                _yaw_factor[motor_num] = yaw_fac;

                // set order that motor appears in test
                _test_order[motor_num] = testing_order;
        }
}

// add_motor using just position and prop direction
void AP_MotorsMatrix::add_motor(int8_t motor_num, float angle_degrees, float yaw_factor, uint8_t testing_order)
{
        // call raw motor set-up method
        add_motor_raw(
            motor_num,
            cosf(radians(angle_degrees + 90)),               // roll factor
            cosf(radians(angle_degrees)),                    // pitch factor
            yaw_factor,                                      // yaw factor
            testing_order);

}

// add_motor using position and prop direction. Roll and Pitch factors can differ (for asymmetrical frames)
void AP_MotorsMatrix::add_motor(int8_t motor_num, float roll_factor_in_degrees, float pitch_factor_in_degrees, float yaw_factor, uint8_t testing_order)
{
        add_motor_raw(
            motor_num,
            cosf(radians(roll_factor_in_degrees + 90)),
            cosf(radians(pitch_factor_in_degrees)),
            yaw_factor,
            testing_order);
}

[/kenrobot_code]
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-9-20 07:55 , Processed in 0.090869 second(s), 18 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表