clang format

This commit is contained in:
Valentin Boettcher 2021-08-14 11:15:31 +02:00
parent fd760767a6
commit 1019a9da2c
No known key found for this signature in database
GPG key ID: E034E12B7AF56ACE
2 changed files with 18 additions and 18 deletions

View file

@ -52,9 +52,9 @@ constexpr Range ranges[] = {Range::LO, Range::MID, Range::HI};
// rows in range
constexpr int rows[] = {8, 8, 6};
constexpr int range_offsets [] = {0,
rows[1] * num_half_pins,
rows[0] * num_half_pins + rows[1] * num_half_pins};
constexpr int range_offsets[] = {0, rows[1] * num_half_pins,
rows[0] * num_half_pins +
rows[1] * num_half_pins};
/*****************************************************************************/
/* Keys/Notes */
@ -118,10 +118,10 @@ int get_midi_note(Range range, int row, int col) {
}
char midi_velocity(double velocity) {
return (constrain(velocity, min_velocity, max_velocity) - min_velocity) / max_velocity * 127;
return (constrain(velocity, min_velocity, max_velocity) - min_velocity) /
max_velocity * 127;
}
/*****************************************************************************/
/* State */
/*****************************************************************************/

View file

@ -1,4 +1,4 @@
{ pkgs ? import <nixos> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [ arduino git arduino-cli picocom ];
nativeBuildInputs = with pkgs; [ arduino git arduino-cli picocom clang-tools ];
}