[FL-2764] SubGhz: fix CAME, Chamberlain potocol (#1650)
* SubGhz: fix guard time CAME potocol * SubGhz: fix file upload Chamberlain * Github: fix spelling Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
		
							parent
							
								
									7e20df7e93
								
							
						
					
					
						commit
						ce7b943793
					
				
							
								
								
									
										2
									
								
								.github/workflows/amap_analyse.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/amap_analyse.yml
									
									
									
									
										vendored
									
									
								
							@ -86,7 +86,7 @@ jobs:
 | 
				
			|||||||
              ${{ secrets.RSYNC_DEPLOY_USER }}@${{ secrets.RSYNC_DEPLOY_HOST }}:"${{ secrets.RSYNC_DEPLOY_BASE_PATH }}${{steps.names.outputs.branch-name}}/" artifacts/;
 | 
					              ${{ secrets.RSYNC_DEPLOY_USER }}@${{ secrets.RSYNC_DEPLOY_HOST }}:"${{ secrets.RSYNC_DEPLOY_BASE_PATH }}${{steps.names.outputs.branch-name}}/" artifacts/;
 | 
				
			||||||
          rm ./deploy_key;
 | 
					          rm ./deploy_key;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: 'Make .map file analyse'
 | 
					      - name: 'Make .map file analyze'
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          cd artifacts/
 | 
					          cd artifacts/
 | 
				
			||||||
          /Applications/amap/Contents/MacOS/amap -f flipper-z-f7-firmware-${{steps.names.outputs.suffix}}.elf.map
 | 
					          /Applications/amap/Contents/MacOS/amap -f flipper-z-f7-firmware-${{steps.names.outputs.suffix}}.elf.map
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@ -93,7 +93,7 @@ jobs:
 | 
				
			|||||||
            rm -rf artifacts/${BUNDLE_NAME}
 | 
					            rm -rf artifacts/${BUNDLE_NAME}
 | 
				
			||||||
          done
 | 
					          done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: "Check for uncommited changes"
 | 
					      - name: "Check for uncommitted changes"
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          git diff --exit-code
 | 
					          git diff --exit-code
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -112,8 +112,11 @@ static bool subghz_protocol_encoder_came_get_upload(SubGhzProtocolEncoderCame* i
 | 
				
			|||||||
        instance->encoder.size_upload = size_upload;
 | 
					        instance->encoder.size_upload = size_upload;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    //Send header
 | 
					    //Send header
 | 
				
			||||||
    instance->encoder.upload[index++] =
 | 
					    instance->encoder.upload[index++] = level_duration_make(
 | 
				
			||||||
        level_duration_make(false, (uint32_t)subghz_protocol_came_const.te_short * 36);
 | 
					        false,
 | 
				
			||||||
 | 
					        ((instance->generic.data_count_bit == subghz_protocol_came_const.min_count_bit_for_found) ?
 | 
				
			||||||
 | 
					             (uint32_t)subghz_protocol_came_const.te_short * 39 :
 | 
				
			||||||
 | 
					             (uint32_t)subghz_protocol_came_const.te_short * 76));
 | 
				
			||||||
    //Send start bit
 | 
					    //Send start bit
 | 
				
			||||||
    instance->encoder.upload[index++] =
 | 
					    instance->encoder.upload[index++] =
 | 
				
			||||||
        level_duration_make(true, (uint32_t)subghz_protocol_came_const.te_short);
 | 
					        level_duration_make(true, (uint32_t)subghz_protocol_came_const.te_short);
 | 
				
			||||||
@ -213,8 +216,8 @@ void subghz_protocol_decoder_came_feed(void* context, bool level, uint32_t durat
 | 
				
			|||||||
    SubGhzProtocolDecoderCame* instance = context;
 | 
					    SubGhzProtocolDecoderCame* instance = context;
 | 
				
			||||||
    switch(instance->decoder.parser_step) {
 | 
					    switch(instance->decoder.parser_step) {
 | 
				
			||||||
    case CameDecoderStepReset:
 | 
					    case CameDecoderStepReset:
 | 
				
			||||||
        if((!level) && (DURATION_DIFF(duration, subghz_protocol_came_const.te_short * 51) <
 | 
					        if((!level) && (DURATION_DIFF(duration, subghz_protocol_came_const.te_short * 56) <
 | 
				
			||||||
                        subghz_protocol_came_const.te_delta * 51)) { //Need protocol 36 te_short
 | 
					                        subghz_protocol_came_const.te_delta * 47)) {
 | 
				
			||||||
            //Found header CAME
 | 
					            //Found header CAME
 | 
				
			||||||
            instance->decoder.parser_step = CameDecoderStepFoundStartBit;
 | 
					            instance->decoder.parser_step = CameDecoderStepFoundStartBit;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
@ -215,7 +215,7 @@ bool subghz_protocol_encoder_chamb_code_deserialize(void* context, FlipperFormat
 | 
				
			|||||||
            FURI_LOG_E(TAG, "Deserialize error");
 | 
					            FURI_LOG_E(TAG, "Deserialize error");
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if(instance->generic.data_count_bit <
 | 
					        if(instance->generic.data_count_bit >
 | 
				
			||||||
           subghz_protocol_chamb_code_const.min_count_bit_for_found) {
 | 
					           subghz_protocol_chamb_code_const.min_count_bit_for_found) {
 | 
				
			||||||
            FURI_LOG_E(TAG, "Wrong number of bits in key");
 | 
					            FURI_LOG_E(TAG, "Wrong number of bits in key");
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
@ -441,7 +441,7 @@ bool subghz_protocol_decoder_chamb_code_deserialize(void* context, FlipperFormat
 | 
				
			|||||||
        if(!subghz_block_generic_deserialize(&instance->generic, flipper_format)) {
 | 
					        if(!subghz_block_generic_deserialize(&instance->generic, flipper_format)) {
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if(instance->generic.data_count_bit <
 | 
					        if(instance->generic.data_count_bit >
 | 
				
			||||||
           subghz_protocol_chamb_code_const.min_count_bit_for_found) {
 | 
					           subghz_protocol_chamb_code_const.min_count_bit_for_found) {
 | 
				
			||||||
            FURI_LOG_E(TAG, "Wrong number of bits in key");
 | 
					            FURI_LOG_E(TAG, "Wrong number of bits in key");
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user