Skip to content

Latest commit

 

History

History
91 lines (79 loc) · 3.18 KB

README.md

File metadata and controls

91 lines (79 loc) · 3.18 KB

hdrone

Forked from ndrone-experiment to continue development.
Hybrid software for quadrocopter on Node.js.

Diagram
¹ state — data block, contains navigation (attitude) and conditional (temperatures, load average, memory and cpu usage) data;
² video — continuous video stream.

Committing

Commit style

Follow Google's AngularJS.

Commit style propositions

  1. If subject has file/directory, then path shall lead to nearest parent directory/itself.
  2. All file extensions shall be specified, but sources: .ts, .cc, .hh.
  3. Subject name shall be kept as it will be used in code

Algorithm to commit work

  1. If work was done in one commit then push to master.
  2. If word requires more than one commit then:
    2a. create branch {work name};
    2b. commit message conventions are still actual within branches;
    2c. when work is done, do pull and rebase with master;
    2d. merge with --edit --no-ff and name it according to objectives (feat/fix/chore) ({work subject}): {work description};
    2e. then push.

Coding

Order of items within classes

  • static fields
  • static accessors
  • static methods
  • instance fields
  • instance accessors
  • constructor
  • instance methods

Within each of these groups order by access:

  • public
  • private

Code style

TypeScript: follow Google's JavaScript guide. C/C++: follow Google's C++ guide.

Code style propositions

  1. Do not use @const (TypeScript)
  2. Do not use using namespace (C/C++)
  3. Use constructions like if(...), while(...)
  4. Make file_names_like_this
  5. lowerCamelCase (TypeScript)
  6. snake_case (C/C++)
  7. Identation in 4 whitespaces
  8. 80-90 symbols per line
  9. Always align multiline arguments or conditions for readability
  10. Do not use {} for single operators
  11. Prototype extentions in libs/ only
  12. always align : or = by logical blocks and at minimum difference
  13. : without whitespace after variable, but before type (TypeScript)
  14. Name imported modules equal to they real names
  15. use //#TODO: ..., //#FIXME: ... and //#XXX: ...

Logging

Simple: no levels required, write all important logs to stdout. Use next format:
<[event]> [[spot]] <description>

  • event:
    • ERROR — vital negative event
    • WARNING — non-vital negative event
    • REPORT — vital neutral/positive event
  • spot — class, module or function, that caused:
    • ERROR, WARNING — strictly required
    • REPORT — required if related
  • description:
    • ERROR — cause and how system was terminated
    • WARNING — cause and how was ignored
    • REPORT — message

Documenting

Follow Google's JSDoc