Skip to content

Commit

Permalink
Merge pull request #37 from nexdome/release/4.0.0
Browse files Browse the repository at this point in the history
Firmware 4.0.0
  • Loading branch information
NameOfTheDragon committed Jan 13, 2021
2 parents 162cc2c + eaf683a commit 64d3965
Show file tree
Hide file tree
Showing 39 changed files with 678 additions and 500 deletions.
115 changes: 115 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@

[*.{c,c++,cc,cp,cpp,cu,cuh,cxx,h,hh,hlsl,hlsli,hpp,hxx,inc,inl,ino,ipp,mpp,proto,tpp,usf,ush}]
indent_style=tab
indent_size=tab
tab_width=4

[*.{asax,ascx,aspx,cs,cshtml,css,htm,html,js,jsx,master,razor,skin,ts,tsx,vb,xaml,xamlx,xoml}]
indent_style=space
indent_size=4
tab_width=4

[*.{appxmanifest,axml,build,config,csproj,dbml,discomap,dtd,json,jsproj,lsproj,njsproj,nuspec,proj,props,resjson,resw,resx,StyleCop,targets,tasks,vbproj,xml,xsd}]
indent_style=space
indent_size=2
tab_width=2

[*]

# Microsoft .NET properties
csharp_indent_braces=true
csharp_new_line_before_members_in_object_initializers=false
csharp_preferred_modifier_order=public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion
csharp_style_var_elsewhere=true:suggestion
csharp_style_var_for_built_in_types=true:suggestion
csharp_style_var_when_type_is_apparent=true:suggestion
dotnet_naming_rule.private_constants_rule.severity=warning
dotnet_naming_rule.private_constants_rule.style=upper_camel_case_style
dotnet_naming_rule.private_constants_rule.symbols=private_constants_symbols
dotnet_naming_rule.private_instance_fields_rule.severity=warning
dotnet_naming_rule.private_instance_fields_rule.style=lower_camel_case_style
dotnet_naming_rule.private_instance_fields_rule.symbols=private_instance_fields_symbols
dotnet_naming_rule.private_static_fields_rule.severity=warning
dotnet_naming_rule.private_static_fields_rule.style=lower_camel_case_style
dotnet_naming_rule.private_static_fields_rule.symbols=private_static_fields_symbols
dotnet_naming_rule.private_static_readonly_rule.severity=warning
dotnet_naming_rule.private_static_readonly_rule.style=upper_camel_case_style
dotnet_naming_rule.private_static_readonly_rule.symbols=private_static_readonly_symbols
dotnet_naming_style.lower_camel_case_style.capitalization=camel_case
dotnet_naming_style.upper_camel_case_style.capitalization=pascal_case
dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities=private
dotnet_naming_symbols.private_constants_symbols.applicable_kinds=field
dotnet_naming_symbols.private_constants_symbols.required_modifiers=const
dotnet_naming_symbols.private_instance_fields_symbols.applicable_accessibilities=private
dotnet_naming_symbols.private_instance_fields_symbols.applicable_kinds=field
dotnet_naming_symbols.private_static_fields_symbols.applicable_accessibilities=private
dotnet_naming_symbols.private_static_fields_symbols.applicable_kinds=field
dotnet_naming_symbols.private_static_fields_symbols.required_modifiers=static
dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities=private
dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds=field
dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers=static,readonly
dotnet_style_parentheses_in_arithmetic_binary_operators=never_if_unnecessary:none
dotnet_style_parentheses_in_other_binary_operators=never_if_unnecessary:none
dotnet_style_parentheses_in_relational_binary_operators=never_if_unnecessary:none
dotnet_style_predefined_type_for_locals_parameters_members=true:suggestion
dotnet_style_predefined_type_for_member_access=true:suggestion
dotnet_style_qualification_for_event=false:suggestion
dotnet_style_qualification_for_field=false:suggestion
dotnet_style_qualification_for_method=false:suggestion
dotnet_style_qualification_for_property=false:suggestion
dotnet_style_require_accessibility_modifiers=for_non_interface_members:suggestion

# ReSharper properties
resharper_align_linq_query=true
resharper_align_ternary=align_not_nested
resharper_anonymous_method_declaration_braces=next_line_shifted
resharper_apply_auto_detected_rules=false
resharper_blank_lines_after_block_statements=0
resharper_blank_lines_around_single_line_auto_property=1
resharper_blank_lines_around_single_line_property=1
resharper_case_block_braces=next_line_shifted
resharper_cpp_anonymous_method_declaration_braces=next_line_shifted
resharper_cpp_case_block_braces=next_line_shifted
resharper_cpp_empty_block_style=together_same_line
resharper_cpp_invocable_declaration_braces=next_line_shifted
resharper_cpp_other_braces=next_line_shifted
resharper_cpp_type_declaration_braces=next_line_shifted
resharper_csharp_blank_lines_around_field=0
resharper_csharp_blank_lines_around_single_line_invocable=1
resharper_csharp_blank_lines_inside_region=0
resharper_csharp_empty_block_style=together_same_line
resharper_csharp_keep_blank_lines_in_code=1
resharper_csharp_keep_blank_lines_in_declarations=1
resharper_expression_braces=outside
resharper_force_control_statements_braces=only_for_multiline
resharper_instance_members_qualify_declared_in=
resharper_invocable_declaration_braces=next_line_shifted
resharper_js_align_multiline_parameter=true
resharper_js_align_multiple_declaration=true
resharper_js_brace_style=next_line_shifted
resharper_js_empty_block_style=together
resharper_js_indent_switch_labels=true
resharper_linkage_specification_braces=next_line_shifted
resharper_namespace_declaration_braces=next_line_shifted
resharper_other_braces=next_line_shifted
resharper_place_accessorholder_attribute_on_same_line=false
resharper_requires_expression_braces=next_line_shifted
resharper_type_declaration_braces=next_line_shifted
resharper_wrap_linq_expressions=chop_always
resharper_wrap_object_and_collection_initializer_style=wrap_if_long
resharper_xmldoc_keep_user_linebreaks=false
resharper_xmldoc_linebreaks_inside_tags_for_elements_longer_than=100
resharper_xmldoc_max_line_length=100
resharper_xmldoc_use_indent_from_vs=false

# ReSharper inspection severities
resharper_arrange_redundant_parentheses_highlighting=hint
resharper_arrange_this_qualifier_highlighting=hint
resharper_arrange_type_member_modifiers_highlighting=hint
resharper_arrange_type_modifiers_highlighting=hint
resharper_built_in_type_reference_style_for_member_access_highlighting=hint
resharper_built_in_type_reference_style_highlighting=hint
resharper_redundant_base_qualifier_highlighting=warning
resharper_suggest_var_or_type_built_in_types_highlighting=hint
resharper_suggest_var_or_type_elsewhere_highlighting=hint
resharper_suggest_var_or_type_simple_types_highlighting=hint
6 changes: 4 additions & 2 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@
"C:\\Users\\Tim\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.209\\**",
"F:\\Arduino\\hardware\\arduino\\avr\\**",
"F:\\Arduino\\tools\\**",
"C:\\Users\\Tim\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.23\\**"
"C:\\Users\\Tim\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.23\\**",
"C:\\Users\\Tim\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.1\\**"
],
"forcedInclude": [
"C:\\Users\\Tim\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.21\\cores\\arduino\\Arduino.h",
"C:\\Users\\Tim\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.209\\cores\\arduino\\Arduino.h",
"F:\\Arduino\\hardware\\arduino\\avr\\cores\\arduino\\Arduino.h",
"C:\\Users\\Tim\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.23\\cores\\arduino\\Arduino.h"
"C:\\Users\\Tim\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.23\\cores\\arduino\\Arduino.h",
"C:\\Users\\Tim\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.1\\cores\\arduino\\Arduino.h"
],
"intelliSenseMode": "msvc-x64"
}
Expand Down
5 changes: 3 additions & 2 deletions AdvancedStepper/MicrosteppingMotor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void MicrosteppingMotor::energizeMotor() const
// Disables the motor coils (releases holding torque).
void MicrosteppingMotor::releaseMotor()
{
digitalWrite(enablePin, HIGH); // active low, so de-energize the coils
digitalWrite(enablePin, HIGH); // active low
digitalWrite(stepPin, LOW); // active high, so ensure we are not commanding a step.
}

Expand Down Expand Up @@ -267,7 +267,8 @@ void MicrosteppingMotor::hardStop()
currentAcceleration = 0;
currentVelocity = 0;
direction = 0;
releaseMotor();
if (!configuration->useHoldingTorque)
releaseMotor();
if (stopHandler != nullptr)
stopHandler();
}
Expand Down
1 change: 1 addition & 0 deletions AdvancedStepper/MicrosteppingMotor.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct MotorSettings
uint16_t rampTimeMilliseconds; // milliseconds to ramp from minSpeed to maxSpeed
uint16_t maxSpeed; // maximum number of steps per second
bool directionReversed; // If true, reverses the rotation direction with respect to the step position
bool useHoldingTorque; // Apply holding torque after motor stops (otherwise de-energize the coils)
};

typedef void (*StopHandler) ();
Expand Down
5 changes: 4 additions & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
assembly-versioning-scheme: MajorMinorPatchTag
mode: ContinuousDeployment
continuous-delivery-fallback-tag: ''
next-version: 3.0.0
branches: {}
branches:
master: {}
ignore:
sha: []
merge-message-formats: {}
Loading

0 comments on commit 64d3965

Please sign in to comment.