cpplint: add filter whitespace/comma (#29595)
old-commit-hash: 7bfd3dac811ae95bfd09495e88377dfbaacda393
This commit is contained in:
@@ -64,7 +64,7 @@ repos:
|
||||
- --linelength=240
|
||||
# https://google.github.io/styleguide/cppguide.html
|
||||
# relevant rules are whitelisted, see all options with: cpplint --filter=
|
||||
- --filter=-build,-legal,-readability,-runtime,-whitespace,+build/include_subdir,+build/forward_decl,+build/include_what_you_use,+build/deprecated,+whitespace/line_length,+whitespace/empty_if_body,+whitespace/empty_loop_body,+whitespace/empty_conditional_body,+whitespace/forcolon,+whitespace/parens,+whitespace/semicolon,+whitespace/tab,+readability/braces
|
||||
- --filter=-build,-legal,-readability,-runtime,-whitespace,+build/include_subdir,+build/forward_decl,+build/include_what_you_use,+build/deprecated,+whitespace/comma,+whitespace/line_length,+whitespace/empty_if_body,+whitespace/empty_loop_body,+whitespace/empty_conditional_body,+whitespace/forcolon,+whitespace/parens,+whitespace/semicolon,+whitespace/tab,+readability/braces
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: test_translations
|
||||
|
||||
@@ -39,9 +39,9 @@ void hexdump(uint32_t *d, int l) {
|
||||
|
||||
int main() {
|
||||
int fd = open("/dev/mem", O_RDWR);
|
||||
volatile uint32_t *mb = (uint32_t*)mmap(0,0x1000,PROT_READ | PROT_WRITE,MAP_SHARED,fd,0x06400000);
|
||||
volatile uint32_t *mc = (uint32_t*)mmap(0,0x1000,PROT_READ | PROT_WRITE,MAP_SHARED,fd,0x06480000);
|
||||
volatile uint32_t *md = (uint32_t*)mmap(0,0x1000,PROT_READ | PROT_WRITE,MAP_SHARED,fd,0x09A20000);
|
||||
volatile uint32_t *mb = (uint32_t *)mmap(0, 0x1000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0x06400000);
|
||||
volatile uint32_t *mc = (uint32_t *)mmap(0, 0x1000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0x06480000);
|
||||
volatile uint32_t *md = (uint32_t *)mmap(0, 0x1000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0x09A20000);
|
||||
while (1) {
|
||||
printf("PLL MODE:%x L_VAL:%x ALPHA:%x USER_CTL:%x CONFIG_CTL:%x CONFIG_CTL_HI:%x STATUS:%x TEST_CTL_LO:%x TEST_CTL_HI:%x\n",
|
||||
mb[C0_PLL_MODE/4], mb[C0_PLL_L_VAL/4], mb[C0_PLL_ALPHA/4],
|
||||
|
||||
@@ -30,7 +30,7 @@ mat3 update_calibration(Eigen::Vector3d device_from_calib_euler, bool wide_camer
|
||||
static const auto calib_from_medmodel = (Eigen::Matrix<float, 3, 3>() <<
|
||||
0.00000000e+00, 0.00000000e+00, 1.00000000e+00,
|
||||
1.09890110e-03, 0.00000000e+00, -2.81318681e-01,
|
||||
-2.25466395e-20, 1.09890110e-03,-5.23076923e-02).finished();
|
||||
-2.25466395e-20, 1.09890110e-03, -5.23076923e-02).finished();
|
||||
|
||||
static const auto calib_from_sbigmodel = (Eigen::Matrix<float, 3, 3>() <<
|
||||
0.00000000e+00, 7.31372216e-19, 1.00000000e+00,
|
||||
|
||||
@@ -157,7 +157,7 @@ void fill_meta(cereal::ModelDataV2::MetaData::Builder meta, const ModelOutputMet
|
||||
softmax(meta_data.desire_pred_prob[i].array.data(), desire_pred_softmax.data() + (i * DESIRE_LEN), DESIRE_LEN);
|
||||
}
|
||||
|
||||
std::array<float, DISENGAGE_LEN> lat_long_t = {2,4,6,8,10};
|
||||
std::array<float, DISENGAGE_LEN> lat_long_t = {2, 4, 6, 8, 10};
|
||||
std::array<float, DISENGAGE_LEN> gas_disengage_sigmoid, brake_disengage_sigmoid, steer_override_sigmoid,
|
||||
brake_3ms2_sigmoid, brake_4ms2_sigmoid, brake_5ms2_sigmoid;
|
||||
for (int i=0; i<DISENGAGE_LEN; i++) {
|
||||
|
||||
@@ -96,7 +96,7 @@ void test(char *filename) {
|
||||
void get_testframe(int index, std::unique_ptr<zdl::DlSystem::ITensor> &input) {
|
||||
FILE * pFile;
|
||||
string filepath="/data/ipt/quantize_samples/sample_input_"+std::to_string(index);
|
||||
pFile = fopen(filepath.c_str(),"rb");
|
||||
pFile = fopen(filepath.c_str(), "rb");
|
||||
int length = 1*6*160*320*4;
|
||||
float * frame_buffer = new float[length/4]; // 32/8
|
||||
fread(frame_buffer, length, 1, pFile);
|
||||
@@ -164,7 +164,7 @@ void testrun(char* modelfile) {
|
||||
for (int i=0; i<10000; i++) {
|
||||
std::unique_ptr<zdl::DlSystem::ITensor> input;
|
||||
input = zdl::SNPE::SNPEFactory::getTensorFactory().createTensor(inputShape);
|
||||
get_testframe(i,input);
|
||||
get_testframe(i, input);
|
||||
snpe->execute(input.get(), outputTensorMap);
|
||||
zdl::DlSystem::StringList tensorNames = outputTensorMap.getTensorNames();
|
||||
std::for_each(tensorNames.begin(), tensorNames.end(), [&](const char* name) {
|
||||
|
||||
@@ -104,37 +104,37 @@ Keyboard::Keyboard(QWidget *parent) : QFrame(parent) {
|
||||
|
||||
// lowercase
|
||||
std::vector<QVector<QString>> lowercase = {
|
||||
{"q","w","e","r","t","y","u","i","o","p"},
|
||||
{"a","s","d","f","g","h","j","k","l"},
|
||||
{"↑","z","x","c","v","b","n","m",BACKSPACE_KEY},
|
||||
{"123"," ",".",ENTER_KEY},
|
||||
{"q", "w", "e", "r", "t", "y", "u", "i", "o", "p"},
|
||||
{"a", "s", "d", "f", "g", "h", "j", "k", "l"},
|
||||
{"↑", "z", "x", "c", "v", "b", "n", "m", BACKSPACE_KEY},
|
||||
{"123", " ", ".", ENTER_KEY},
|
||||
};
|
||||
main_layout->addWidget(new KeyboardLayout(this, lowercase));
|
||||
|
||||
// uppercase
|
||||
std::vector<QVector<QString>> uppercase = {
|
||||
{"Q","W","E","R","T","Y","U","I","O","P"},
|
||||
{"A","S","D","F","G","H","J","K","L"},
|
||||
{"↓","Z","X","C","V","B","N","M",BACKSPACE_KEY},
|
||||
{"123"," ",".",ENTER_KEY},
|
||||
{"Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P"},
|
||||
{"A", "S", "D", "F", "G", "H", "J", "K", "L"},
|
||||
{"↓", "Z", "X", "C", "V", "B", "N", "M", BACKSPACE_KEY},
|
||||
{"123", " ", ".", ENTER_KEY},
|
||||
};
|
||||
main_layout->addWidget(new KeyboardLayout(this, uppercase));
|
||||
|
||||
// numbers + specials
|
||||
std::vector<QVector<QString>> numbers = {
|
||||
{"1","2","3","4","5","6","7","8","9","0"},
|
||||
{"-","/",":",";","(",")","$","&&","@","\""},
|
||||
{"#+=",".",",","?","!","`",BACKSPACE_KEY},
|
||||
{"ABC"," ",".",ENTER_KEY},
|
||||
{"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"},
|
||||
{"-", "/", ":", ";", "(", ")", "$", "&&", "@", "\""},
|
||||
{"#+=", ".", ",", "?", "!", "`", BACKSPACE_KEY},
|
||||
{"ABC", " ", ".", ENTER_KEY},
|
||||
};
|
||||
main_layout->addWidget(new KeyboardLayout(this, numbers));
|
||||
|
||||
// extra specials
|
||||
std::vector<QVector<QString>> specials = {
|
||||
{"[","]","{","}","#","%","^","*","+","="},
|
||||
{"_","\\","|","~","<",">","€","£","¥","•"},
|
||||
{"123",".",",","?","!","'",BACKSPACE_KEY},
|
||||
{"ABC"," ",".",ENTER_KEY},
|
||||
{"[", "]", "{", "}", "#", "%", "^", "*", "+", "="},
|
||||
{"_", "\\", "|", "~", "<", ">", "€", "£", "¥", "•"},
|
||||
{"123", ".", ",", "?", "!", "'", BACKSPACE_KEY},
|
||||
{"ABC", " ", ".", ENTER_KEY},
|
||||
};
|
||||
main_layout->addWidget(new KeyboardLayout(this, specials));
|
||||
|
||||
|
||||
@@ -169,15 +169,15 @@ static void update_state(UIState *s) {
|
||||
Eigen::Matrix3d device_from_calib = euler2rot(rpy);
|
||||
Eigen::Matrix3d wide_from_device = euler2rot(wfde);
|
||||
Eigen::Matrix3d view_from_device;
|
||||
view_from_device << 0,1,0,
|
||||
0,0,1,
|
||||
1,0,0;
|
||||
view_from_device << 0, 1, 0,
|
||||
0, 0, 1,
|
||||
1, 0, 0;
|
||||
Eigen::Matrix3d view_from_calib = view_from_device * device_from_calib;
|
||||
Eigen::Matrix3d view_from_wide_calib = view_from_device * wide_from_device * device_from_calib;
|
||||
for (int i = 0; i < 3; i++) {
|
||||
for (int j = 0; j < 3; j++) {
|
||||
scene.view_from_calib.v[i*3 + j] = view_from_calib(i,j);
|
||||
scene.view_from_wide_calib.v[i*3 + j] = view_from_wide_calib(i,j);
|
||||
scene.view_from_calib.v[i*3 + j] = view_from_calib(i, j);
|
||||
scene.view_from_wide_calib.v[i*3 + j] = view_from_wide_calib(i, j);
|
||||
}
|
||||
}
|
||||
scene.calibration_valid = live_calib.getCalStatus() == cereal::LiveCalibrationData::Status::CALIBRATED;
|
||||
|
||||
@@ -5,14 +5,13 @@
|
||||
|
||||
#define TONE_SPLITS 3
|
||||
|
||||
float gts[TONE_SPLITS*TONE_SPLITS*TONE_SPLITS*TONE_SPLITS] = {
|
||||
0.917969,0.917969,0.375000,0.917969,0.375000,0.375000,0.187500,0.187500,0.187500,0.917969,
|
||||
0.375000,0.375000,0.187500,0.187500,0.187500,0.187500,0.187500,0.187500,0.093750,0.093750,
|
||||
0.093750,0.093750,0.093750,0.093750,0.093750,0.093750,0.093750,0.917969,0.375000,0.375000,
|
||||
0.187500,0.187500,0.187500,0.187500,0.187500,0.187500,0.093750,0.093750,0.093750,0.093750,
|
||||
0.093750,0.093750,0.093750,0.093750,0.093750,0.093750,0.093750,0.093750,0.093750,0.093750,
|
||||
0.093750,0.093750,0.093750,0.093750,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
|
||||
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
|
||||
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
|
||||
0.000000
|
||||
};
|
||||
float gts[TONE_SPLITS * TONE_SPLITS * TONE_SPLITS * TONE_SPLITS] = {
|
||||
0.917969, 0.917969, 0.375000, 0.917969, 0.375000, 0.375000, 0.187500, 0.187500, 0.187500, 0.917969,
|
||||
0.375000, 0.375000, 0.187500, 0.187500, 0.187500, 0.187500, 0.187500, 0.187500, 0.093750, 0.093750,
|
||||
0.093750, 0.093750, 0.093750, 0.093750, 0.093750, 0.093750, 0.093750, 0.917969, 0.375000, 0.375000,
|
||||
0.187500, 0.187500, 0.187500, 0.187500, 0.187500, 0.187500, 0.093750, 0.093750, 0.093750, 0.093750,
|
||||
0.093750, 0.093750, 0.093750, 0.093750, 0.093750, 0.093750, 0.093750, 0.093750, 0.093750, 0.093750,
|
||||
0.093750, 0.093750, 0.093750, 0.093750, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,
|
||||
0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,
|
||||
0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000,
|
||||
0.000000};
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
// echo 0x7fffffff > /sys/kernel/debug/msm_vidc/debug_level
|
||||
const int env_debug_encoder = (getenv("DEBUG_ENCODER") != NULL) ? atoi(getenv("DEBUG_ENCODER")) : 0;
|
||||
|
||||
#define checked_ioctl(x,y,z) { int _ret = HANDLE_EINTR(ioctl(x,y,z)); if (_ret!=0) { LOGE("checked_ioctl failed %d %lx %p", x, y, z); } assert(_ret==0); }
|
||||
#define checked_ioctl(x, y, z) { int _ret = HANDLE_EINTR(ioctl(x, y, z)); if (_ret!=0) { LOGE("checked_ioctl failed %d %lx %p", x, y, z); } assert(_ret==0); }
|
||||
|
||||
static void dequeue_buffer(int fd, v4l2_buf_type buf_type, unsigned int *index=NULL, unsigned int *bytesused=NULL, unsigned int *flags=NULL, struct timeval *timestamp=NULL) {
|
||||
v4l2_plane plane = {0};
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
MessagesWidget::MessagesWidget(QWidget *parent) : QWidget(parent) {
|
||||
QVBoxLayout *main_layout = new QVBoxLayout(this);
|
||||
main_layout->setContentsMargins(0 ,0, 0, 0);
|
||||
main_layout->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
QHBoxLayout *title_layout = new QHBoxLayout();
|
||||
num_msg_label = new QLabel(this);
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
private:
|
||||
std::pair<double, double> get_minmax(int n, int left, int right, int range_left, int range_right) const;
|
||||
void build_tree(const QVector<QPointF> &arr, int n, int left, int right);
|
||||
std::vector<std::pair<double ,double>> tree;
|
||||
std::vector<std::pair<double, double>> tree;
|
||||
int size = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user